1 ; Test that llvm-reduce can reduce pointer operands
2 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-one --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
3 ; RUN: FileCheck --check-prefixes=CHECK,ONE %s < %t
5 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-zero --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
6 ; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t
8 ; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
9 ; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t
11 ; CHECK-LABEL: define void @foo(
13 ; ONE: load i32, ptr %a0
14 ; ONE: load i32, ptr @g
15 ; ONE: extractelement <4 x ptr> <ptr @g, ptr null, ptr @g, ptr @g>, i32 11
17 ; ZERO: load i32, ptr null
18 ; ZERO: load i32, ptr null
19 ; ZERO: extractelement <4 x ptr> zeroinitializer, i32 11
23 define void @foo(ptr %a0) {
24 ; CHECK-INTERESTINGNESS: load i32
25 %v0 = load i32, ptr %a0
26 ; CHECK-INTERESTINGNESS: load i32
27 %v1 = load i32, ptr @g
29 ; CHECK-INTERESTINGNESS: extractelement{{.*}}i32 11
30 %v2 = extractelement <4 x ptr> <ptr @g, ptr null, ptr @g, ptr @g>, i32 11