| Index: tests_lit/llvm2ice_tests/phi.ll
|
| diff --git a/tests_lit/llvm2ice_tests/phi.ll b/tests_lit/llvm2ice_tests/phi.ll
|
| index abdc1b3beaf4068521811519515b4b7da516a354..4e75850c2115a664eb5138f608c5f991b9994cc5 100644
|
| --- a/tests_lit/llvm2ice_tests/phi.ll
|
| +++ b/tests_lit/llvm2ice_tests/phi.ll
|
| @@ -4,6 +4,8 @@
|
|
|
| ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 --phi-edge-split=0 \
|
| ; RUN: | FileCheck %s
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 --phi-edge-split=1 \
|
| +; RUN: | FileCheck --check-prefix=SPLIT %s
|
|
|
| define internal i32 @testPhi1(i32 %arg) {
|
| entry:
|
| @@ -99,3 +101,59 @@ exit:
|
| ; CHECK: jne
|
| ; CHECK: mov DWORD PTR [[ADDR]]
|
| ; CHECK: pop [[EBX]]
|
| +
|
| +; Test of "advanced phi lowering" with undef phi arg (integer vector).
|
| +define internal <4 x i32> @test_split_undef_int_vec(<4 x i32> %arg, i32 %cond) {
|
| +entry:
|
| + %cmp = icmp eq i32 %cond, 0
|
| + br i1 %cmp, label %eq, label %exit
|
| +eq:
|
| + br label %exit
|
| +exit:
|
| + %merge = phi <4 x i32> [ %arg, %entry ], [ undef, %eq ]
|
| + ret <4 x i32> %merge
|
| +}
|
| +; SPLIT-LABEL: test_split_undef_int_vec
|
| +; SPLIT: pxor
|
| +
|
| +; Test of "advanced phi lowering" with undef phi arg (float vector).
|
| +define internal <4 x float> @test_split_undef_float_vec(<4 x float> %arg, i32 %cond) {
|
| +entry:
|
| + %cmp = icmp eq i32 %cond, 0
|
| + br i1 %cmp, label %eq, label %exit
|
| +eq:
|
| + br label %exit
|
| +exit:
|
| + %merge = phi <4 x float> [ %arg, %entry ], [ undef, %eq ]
|
| + ret <4 x float> %merge
|
| +}
|
| +; SPLIT-LABEL: test_split_undef_float_vec
|
| +; SPLIT: pxor
|
| +
|
| +; Test of "advanced phi lowering" with undef phi arg (integer scalar).
|
| +define internal i32 @test_split_undef_int_scalar(i32 %arg, i32 %cond) {
|
| +entry:
|
| + %cmp = icmp eq i32 %cond, 0
|
| + br i1 %cmp, label %eq, label %exit
|
| +eq:
|
| + br label %exit
|
| +exit:
|
| + %merge = phi i32 [ %arg, %entry ], [ undef, %eq ]
|
| + ret i32 %merge
|
| +}
|
| +; SPLIT-LABEL: test_split_undef_int_scalar
|
| +; SPLIT: mov {{.*}},0x0
|
| +
|
| +; Test of "advanced phi lowering" with undef phi arg (float scalar).
|
| +define internal float @test_split_undef_float_scalar(float %arg, i32 %cond) {
|
| +entry:
|
| + %cmp = icmp eq i32 %cond, 0
|
| + br i1 %cmp, label %eq, label %exit
|
| +eq:
|
| + br label %exit
|
| +exit:
|
| + %merge = phi float [ %arg, %entry ], [ undef, %eq ]
|
| + ret float %merge
|
| +}
|
| +; SPLIT-LABEL: test_split_undef_float_scalar
|
| +; SPLIT: movss {{.*}},DWORD PTR
|
|
|