[PATCH] D33890: AMDGPU/GlobalISel: Mark 32-bit G_ICMP as legal
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 07:17:22 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304797: AMDGPU/GlobalISel: Mark 32-bit G_ICMP as legal (authored by tstellar).
Changed prior to commit:
https://reviews.llvm.org/D33890?vs=101391&id=101561#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33890
Files:
llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -47,6 +47,9 @@
setAction({G_GEP, P2}, Legal);
setAction({G_GEP, 1, S64}, Legal);
+ setAction({G_ICMP, S1}, Legal);
+ setAction({G_ICMP, 1, S32}, Legal);
+
setAction({G_LOAD, P1}, Legal);
setAction({G_LOAD, P2}, Legal);
setAction({G_LOAD, S32}, Legal);
Index: llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir
+++ llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir
@@ -0,0 +1,24 @@
+# RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer -global-isel %s -o - | FileCheck %s
+
+--- |
+ define void @test_icmp() {
+ entry:
+ ret void
+ }
+...
+
+---
+name: test_icmp
+registers:
+ - { id: 0, class: _ }
+ - { id: 1, class: _ }
+ - { id: 2, class: _ }
+body: |
+ bb.0.entry:
+ liveins: %vgpr0
+ %0(s32) = G_CONSTANT i32 0
+ %1(s32) = COPY %vgpr0
+
+ ; CHECK: %2(s1) = G_ICMP intpred(ne), %0(s32), %1
+ %2(s1) = G_ICMP intpred(ne), %0, %1
+...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33890.101561.patch
Type: text/x-patch
Size: 1296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170606/b3f0b93f/attachment.bin>
More information about the llvm-commits
mailing list