llvm.org GIT mirror llvm / 55d2b21
AMDGPU/GlobalISel: Mark 32-bit G_SELECT as legal Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D33949 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304910 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
2 changed file(s) with 31 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5555 setAction({G_LOAD, 1, P1}, Legal);
5656 setAction({G_LOAD, 1, P2}, Legal);
5757
58 setAction({G_SELECT, S32}, Legal);
59 setAction({G_SELECT, 1, S1}, Legal);
60
5861 setAction({G_STORE, S32}, Legal);
5962 setAction({G_STORE, 1, P1}, Legal);
6063
0 # RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer -global-isel %s -o - | FileCheck %s
1
2 --- |
3 define void @test_select() { ret void }
4 ...
5
6 ---
7 name: test_select
8 registers:
9 - { id: 0, class: _ }
10 - { id: 1, class: _ }
11 - { id: 2, class: _ }
12 - { id: 3, class: _ }
13 - { id: 4, class: _ }
14 - { id: 5, class: _ }
15 body: |
16 bb.0:
17 liveins: %vgpr0
18 %0(s32) = G_CONSTANT i32 0
19 %1(s32) = COPY %vgpr0
20
21 %2(s1) = G_ICMP intpred(ne), %0, %1
22 %3(s32) = G_CONSTANT i32 1
23 %4(s32) = G_CONSTANT i32 2
24 ; CHECK: %5(s32) = G_SELECT %2(s1), %3, %4
25 %5(s32) = G_SELECT %2, %3, %4
26
27 ...