brintos

brintos / llvm-project-archived public Read only

0
0
Text · 792 B · 7291d83 Raw
28 lines · plain
1; RUN: opt -S --passes="default<O3>" -funcspec-for-literal-constant=false < %s | FileCheck %s2 3define dso_local i32 @g0(i32 noundef %x) local_unnamed_addr {4entry:5  %call = tail call fastcc i32 @f(i32 noundef %x, ptr noundef nonnull @p0)6  ret i32 %call7}8 9define internal fastcc i32 @f(i32 noundef %x, ptr nocapture noundef readonly %p) noinline {10entry:11  %call = tail call i32 %p(i32 noundef %x)12  %add = add nsw i32 %call, %x13  ret i32 %add14}15 16define dso_local i32 @g1(i32 noundef %x) {17entry:18  %call = tail call fastcc i32 @f(i32 noundef %x, ptr noundef nonnull @p1)19  ret i32 %call20}21 22declare i32 @p0(i32 noundef)23declare i32 @p1(i32 noundef)24 25;; Tests that `f` has been fully specialize and it didn't cause compiler crash.26;; CHECK-DAG: f.specialized.127;; CHECK-DAG: f.specialized.228