1 ; Test that llvm-reduce can remove uninteresting Global Variables as well as
2 ; their direct uses (which in turn are replaced with 'undef').
5 ; RUN: llvm-reduce --test %python --test-arg %p/Inputs/remove-global-vars.py %s -o %t
6 ; RUN: cat %t | FileCheck -implicit-check-not=uninteresting %s
8 ; CHECK: @interesting = global
9 @interesting = global i32 0, align 4
10 @uninteresting = global i32 1, align 4
14 %0 = load i32, i32* @uninteresting, align 4
15 ; CHECK: store i32 undef, i32* @interesting, align 4
16 store i32 %0, i32* @interesting, align 4
18 ; CHECK: load i32, i32* @interesting, align 4
19 %1 = load i32, i32* @interesting, align 4
20 store i32 %1, i32* @uninteresting, align 4
22 ; CHECK: store i32 5, i32* @interesting, align 4
23 store i32 5, i32* @interesting, align 4