aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir')
-rw-r--r--test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir b/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
index d11130936bd9b..af633789182c1 100644
--- a/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
+++ b/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
@@ -1,3 +1,4 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer -global-isel %s -o - | FileCheck %s
--- |
@@ -16,13 +17,20 @@ registers:
body: |
bb.0:
liveins: %vgpr0
+ ; CHECK-LABEL: name: test_select
+ ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
+ ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY %vgpr0
+ ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
+ ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
+ ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
+ ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
%0(s32) = G_CONSTANT i32 0
%1(s32) = COPY %vgpr0
%2(s1) = G_ICMP intpred(ne), %0, %1
%3(s32) = G_CONSTANT i32 1
%4(s32) = G_CONSTANT i32 2
- ; CHECK: %5(s32) = G_SELECT %2(s1), %3, %4
%5(s32) = G_SELECT %2, %3, %4
+ %vgpr0 = COPY %5
...