1 ; Test that llvm-reduce can remove uninteresting instructions.
3 ; RUN: llvm-reduce --test %python --test-arg %p/Inputs/remove-instructions.py %s -o %t
4 ; RUN: cat %t | FileCheck -implicit-check-not=uninteresting %s
7 ; We're testing all direct uses of %interesting are conserved. The terminator
8 ; (ret) must also be preserved.
10 ; CHECK-COUNT-5: %interesting
13 define i32 @main() #0 {
15 %uninteresting1 = alloca i32, align 4
16 %interesting = alloca i32, align 4
17 %uninteresting2 = alloca i32, align 4
18 store i32 0, i32* %uninteresting1, align 4
19 store i32 0, i32* %interesting, align 4
20 %0 = load i32, i32* %interesting, align 4
21 %uninteresting3 = add nsw i32 %0, 1
22 store i32 %uninteresting3, i32* %interesting, align 4
23 %1 = load i32, i32* %interesting, align 4
24 store i32 %1, i32* %uninteresting2, align 4