brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 4669cf7 Raw
34 lines · plain
1; Test that llvm-reduce can reduce pointer operands2; 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 %t3; RUN: FileCheck --check-prefixes=CHECK,ONE %s < %t4 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 %t6; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t7 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 %t9; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t10 11; CHECK-LABEL: define {{(void|ptr)}} @foo(12 13; ONE: load i32, ptr %a014; ONE: load i32, ptr @g15; ONE: extractelement <4 x ptr> <ptr @g, ptr null, ptr @g, ptr @g>, i32 1116 17; ZERO: load i32, ptr null18; ZERO: load i32, ptr null19; ZERO: extractelement <4 x ptr> zeroinitializer, i32 1120 21@g = global i32 022 23define void @foo(ptr %a0) {24  ; CHECK-INTERESTINGNESS: load i3225  %v0 = load i32, ptr %a026  ; CHECK-INTERESTINGNESS: load i3227  %v1 = load i32, ptr @g28 29  ; CHECK-INTERESTINGNESS: extractelement{{.*}}i32 1130  %v2 = extractelement <4 x ptr> <ptr @g, ptr null, ptr @g, ptr @g>, i32 1131 32  ret void33}34