[PATCH] D43699: [AMDGPU] Shrinking V_SUBBREV_U32
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 17:37:39 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL326011: [AMDGPU] Shrinking V_SUBBREV_U32 (authored by rampitec, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43699?vs=135707&id=135747#toc
Repository:
rL LLVM
https://reviews.llvm.org/D43699
Files:
llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
llvm/trunk/test/CodeGen/AMDGPU/combine-cond-add-sub.ll
llvm/trunk/test/CodeGen/AMDGPU/shrink-carry.mir
Index: llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -92,7 +92,8 @@
case AMDGPU::V_ADDC_U32_e64:
case AMDGPU::V_SUBB_U32_e64:
- if (TII->getNamedOperand(MI, AMDGPU::OpName::src1)->isImm())
+ case AMDGPU::V_SUBBREV_U32_e64:
+ if (!isVGPR(TII->getNamedOperand(MI, AMDGPU::OpName::src1), TRI, MRI))
return false;
// Additional verification is needed for sdst/src2.
return true;
Index: llvm/trunk/test/CodeGen/AMDGPU/shrink-carry.mir
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/shrink-carry.mir
+++ llvm/trunk/test/CodeGen/AMDGPU/shrink-carry.mir
@@ -1,7 +1,7 @@
# RUN: llc -march=amdgcn -verify-machineinstrs -start-before si-shrink-instructions -stop-before si-insert-skips -o - %s | FileCheck -check-prefix=GCN %s
# GCN-LABEL: name: subbrev{{$}}
-# GCN: V_SUBBREV_U32_e64 0, undef $vgpr0, killed $vcc, implicit $exec
+# GCN: V_SUBBREV_U32_e32 0, undef $vgpr0, implicit-def $vcc, implicit killed $vcc, implicit $exec
---
name: subbrev
@@ -25,7 +25,7 @@
...
# GCN-LABEL: name: subb{{$}}
-# GCN: V_SUBB_U32_e64 undef $vgpr0, 0, killed $vcc, implicit $exec
+# GCN: V_SUBBREV_U32_e32 0, undef $vgpr0, implicit-def $vcc, implicit killed $vcc, implicit $exec
---
name: subb
Index: llvm/trunk/test/CodeGen/AMDGPU/combine-cond-add-sub.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/combine-cond-add-sub.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/combine-cond-add-sub.ll
@@ -19,8 +19,8 @@
}
; GCN-LABEL: {{^}}sub1:
-; GCN: v_cmp_gt_u32_e{{32|64}} [[CC:[^,]+]], v{{[0-9]+}}, v{{[0-9]+}}
-; GCN: v_subb_u32_e{{32|64}} v{{[0-9]+}}, {{[^,]+}}, v{{[0-9]+}}, 0, [[CC]]
+; GCN: v_cmp_gt_u32_e32 vcc, v{{[0-9]+}}, v{{[0-9]+}}
+; GCN: v_subbrev_u32_e32 v{{[0-9]+}}, vcc, 0, v{{[0-9]+}}, vcc
; GCN-NOT: v_cndmask
define amdgpu_kernel void @sub1(i32 addrspace(1)* nocapture %arg) {
@@ -134,8 +134,8 @@
}
; GCN-LABEL: {{^}}sext_flclass:
-; GCN: v_cmp_class_f32_e{{32|64}} [[CC:[^,]+]],
-; GCN: v_subb_u32_e{{32|64}} v{{[0-9]+}}, {{[^,]+}}, v{{[0-9]+}}, 0, [[CC]]
+; GCN: v_cmp_class_f32_e32 vcc,
+; GCN: v_subbrev_u32_e32 v{{[0-9]+}}, vcc, 0, v{{[0-9]+}}, vcc
; GCN-NOT: v_cndmask
define amdgpu_kernel void @sext_flclass(i32 addrspace(1)* nocapture %arg, float %x) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43699.135747.patch
Type: text/x-patch
Size: 2594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180224/d6ada112/attachment.bin>
More information about the llvm-commits
mailing list