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
8 ; CHECK-COUNT-5: %interesting
9 define i32 @main() #0 {
11 %uninteresting1 = alloca i32, align 4
12 %interesting = alloca i32, align 4
13 %uninteresting2 = alloca i32, align 4
14 store i32 0, i32* %uninteresting1, align 4
15 store i32 0, i32* %interesting, align 4
16 %0 = load i32, i32* %interesting, align 4
17 %uninteresting3 = add nsw i32 %0, 1
18 store i32 %uninteresting3, i32* %interesting, align 4
19 %1 = load i32, i32* %interesting, align 4
20 store i32 %1, i32* %uninteresting2, align 4