brintos

brintos / llvm-project-archived public Read only

0
0
Text · 810 B · 603acc5 Raw
23 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=ifuncs --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s3 4; Check some cases that should probably be invalid IR don't break5; anything.6 7; CHECK-FINAL: @ifunc_with_arg = ifunc void (), ptr @resolver_with_arg8@ifunc_with_arg = ifunc void (), ptr @resolver_with_arg9 10define ptr @resolver_with_arg(i64 %arg) {11  %cast = inttoptr i64 %arg to ptr12  ret ptr %cast13}14 15; CHECK-INTERESTINGNESS: define void @call_with_arg()16define void @call_with_arg() {17  ; CHECK-FINAL: define void @call_with_arg() {18  ; CHECK-FINAL-NEXT: call void @ifunc_with_arg()19  ; CHECK-FINAL-NEXT: ret void20  call void @ifunc_with_arg()21  ret void22}23