llvm.org GIT mirror llvm / 5d24d88
AMDGPU/GlobalISel: Mark 32-bit G_ICMP 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/D33890 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304797 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
2 changed file(s) with 27 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4646 setAction({G_GEP, P2}, Legal);
4747 setAction({G_GEP, 1, S64}, Legal);
4848
49 setAction({G_ICMP, S1}, Legal);
50 setAction({G_ICMP, 1, S32}, Legal);
51
4952 setAction({G_LOAD, P1}, Legal);
5053 setAction({G_LOAD, P2}, Legal);
5154 setAction({G_LOAD, S32}, Legal);
0 # RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer -global-isel %s -o - | FileCheck %s
1
2 --- |
3 define void @test_icmp() {
4 entry:
5 ret void
6 }
7 ...
8
9 ---
10 name: test_icmp
11 registers:
12 - { id: 0, class: _ }
13 - { id: 1, class: _ }
14 - { id: 2, class: _ }
15 body: |
16 bb.0.entry:
17 liveins: %vgpr0
18 %0(s32) = G_CONSTANT i32 0
19 %1(s32) = COPY %vgpr0
20
21 ; CHECK: %2(s1) = G_ICMP intpred(ne), %0(s32), %1
22 %2(s1) = G_ICMP intpred(ne), %0, %1
23 ...