27 lines · plain
1; Test that llvm-reduce can remove uninteresting instructions.2;3; RUN: llvm-reduce -abort-on-invalid-reduction --test %python --test-arg %p/Inputs/remove-instructions.py %s -o %t4; RUN: cat %t | FileCheck -implicit-check-not=uninteresting %s5; REQUIRES: plugins6 7; We're testing all direct uses of %interesting are conserved. The terminator8; (ret) must also be preserved.9 10; CHECK-COUNT-5: %interesting11; CHECK: ret12 13define i32 @main() #0 {14entry:15 %uninteresting1 = alloca i32, align 416 %interesting = alloca i32, align 417 %uninteresting2 = alloca i32, align 418 store i32 0, ptr %uninteresting1, align 419 store i32 0, ptr %interesting, align 420 %0 = load i32, ptr %interesting, align 421 %uninteresting3 = add nsw i32 %0, 122 store i32 %uninteresting3, ptr %interesting, align 423 %1 = load i32, ptr %interesting, align 424 store i32 %1, ptr %uninteresting2, align 425 ret i32 026}27