1 ; Intrinsic calls can't be uniformly replaced with undef without invalidating
2 ; IR (eg: only intrinsic calls can have metadata arguments), so ensure they are
3 ; not replaced. The whole call instruction can be removed by instruction
6 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefixes=ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
7 ; RUN: FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-FINAL %s < %t
9 ; Check that the call is removed by instruction reduction passes
10 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefix=ALL --test-arg %s --test-arg --input-file %s -o %t
11 ; RUN: FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-NOCALL %s < %t
14 declare ptr @llvm.sponentry.p0()
15 declare i8 @uninteresting()
17 ; ALL-LABEL: define ptr @interesting(
18 define ptr @interesting() {
20 ; CHECK-INTERESTINGNESS: call ptr
21 ; CHECK-NOCALL-NOT: call i8
23 ; CHECK-FINAL: %call = call ptr @llvm.sponentry.p0()
24 ; CHECK-FINAL-NEXT: ret ptr %call
25 %call = call ptr @llvm.sponentry.p0()
26 call i8 @uninteresting()