[PATCH] D136459: [AMDGPU] Use VGPR classes in divergent build_vector patterns
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 08:44:16 PDT 2022
foad created this revision.
foad added reviewers: AMDGPU, arsenm, Pierre-vh.
Herald added subscribers: kosarev, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
This does not appear to affect codegen, but using SGPR classes for
operands of VALU instructions looked weird.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136459
Files:
llvm/lib/Target/AMDGPU/SIInstructions.td
Index: llvm/lib/Target/AMDGPU/SIInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstructions.td
+++ llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -2691,8 +2691,8 @@
>;
def : GCNPat <
- (v2i16 (DivergentBinFrag<build_vector> (i16 0), (i16 SReg_32:$src1))),
- (v2i16 (V_LSHLREV_B32_e64 (i16 16), SReg_32:$src1))
+ (v2i16 (DivergentBinFrag<build_vector> (i16 0), (i16 VGPR_32:$src1))),
+ (v2i16 (V_LSHLREV_B32_e64 (i16 16), VGPR_32:$src1))
>;
@@ -2702,8 +2702,8 @@
>;
def : GCNPat <
- (v2i16 (DivergentBinFrag<build_vector> (i16 SReg_32:$src1), (i16 0))),
- (v2i16 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), SReg_32:$src1))
+ (v2i16 (DivergentBinFrag<build_vector> (i16 VGPR_32:$src1), (i16 0))),
+ (v2i16 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), VGPR_32:$src1))
>;
def : GCNPat <
@@ -2712,8 +2712,8 @@
>;
def : GCNPat <
- (v2f16 (DivergentBinFrag<build_vector> (f16 SReg_32:$src1), (f16 FP_ZERO))),
- (v2f16 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), SReg_32:$src1))
+ (v2f16 (DivergentBinFrag<build_vector> (f16 VGPR_32:$src1), (f16 FP_ZERO))),
+ (v2f16 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), VGPR_32:$src1))
>;
def : GCNPat <
@@ -2737,8 +2737,8 @@
>;
def : GCNPat <
- (v2i16 (DivergentBinFrag<build_vector> (i16 undef), (i16 SReg_32:$src1))),
- (v2i16 (V_LSHLREV_B32_e64 (i32 16), SReg_32:$src1))
+ (v2i16 (DivergentBinFrag<build_vector> (i16 undef), (i16 VGPR_32:$src1))),
+ (v2i16 (V_LSHLREV_B32_e64 (i32 16), VGPR_32:$src1))
>;
@@ -2748,8 +2748,8 @@
>;
def : GCNPat <
- (v2f16 (DivergentBinFrag<build_vector> (f16 undef), (f16 SReg_32:$src1))),
- (v2f16 (V_LSHLREV_B32_e64 (i32 16), SReg_32:$src1))
+ (v2f16 (DivergentBinFrag<build_vector> (f16 undef), (f16 VGPR_32:$src1))),
+ (v2f16 (V_LSHLREV_B32_e64 (i32 16), VGPR_32:$src1))
>;
}
@@ -2760,7 +2760,7 @@
>;
def : GCNPat <
- (v2i16 (DivergentBinFrag<build_vector> (i16 SReg_32:$src0), (i16 SReg_32:$src1))),
+ (v2i16 (DivergentBinFrag<build_vector> (i16 VGPR_32:$src0), (i16 VGPR_32:$src1))),
(v2i16 (V_LSHL_OR_B32_e64 $src1, (i32 16), (i32 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), $src0))))
>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136459.469633.patch
Type: text/x-patch
Size: 2235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/bb9a2eea/attachment-0001.bin>
More information about the llvm-commits
mailing list