brintos

brintos / llvm-project-archived public Read only

0
0
Text · 976 B · 0410bfd Raw
31 lines · plain
1; RUN: opt -passes="ipsccp<func-spec>" -force-specialization -S < %s | FileCheck %s2 3; Check that we don't crash and specialise on a function call with byval attribute.4 5; CHECK-NOT: wombat.specialized.{{[0-9]+}}6 7declare ptr @quux()8declare ptr @eggs()9 10define i32 @main() {11; CHECK:       bb:12; CHECK-NEXT:    tail call void @wombat(ptr undef, i64 undef, i64 undef, ptr byval(i32) @quux)13; CHECK-NEXT:    tail call void @wombat(ptr undef, i64 undef, i64 undef, ptr byval(i32) @eggs)14; CHECK-NEXT:    ret i32 undef15;16bb:17  tail call void @wombat(ptr undef, i64 undef, i64 undef, ptr byval(i32) @quux)18  tail call void @wombat(ptr undef, i64 undef, i64 undef, ptr byval(i32) @eggs)19  ret i32 undef20}21 22define internal void @wombat(ptr %arg, i64 %arg1, i64 %arg2, ptr byval(i32) %func) {23; CHECK:       bb2:24; CHECK-NEXT:    [[TMP:%.*]] = tail call ptr %func(ptr undef, ptr undef)25; CHECK-NEXT:    ret void26;27bb2:28  %tmp = tail call ptr %func(ptr undef, ptr undef)29  ret void30}31