[PATCH] D105347: [AMDGPU][GlobalISel] Legalization and selection of G_ROTL and G_ROTR
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 2 06:49:19 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/VOP3Instructions.td:346
+ (rotr i32:$src0, i32:$src1),
+ (V_ALIGNBIT_B32_e64 VGPR_32:$src0, VGPR_32:$src0, VGPR_32:$src1)
+>;
----------------
Isn't there a lowering to turn this into fshr? Why do we need to directly select this?
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/rotate_pre_instselect.mir:6
+--- |
+ ; ModuleID = '../llvm/test/CodeGen/AMDGPU/GlobalISel/rotl_rotr.ll'
+ source_filename = "../llvm/test/CodeGen/AMDGPU/GlobalISel/rotl_rotr.ll"
----------------
Don't need the IR section, registers section or most of the MIR extras here
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/rotate_pre_regbankselect.mir:713
+ $sgpr2 = COPY %18(s32)
+ %19:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.readfirstlane), %31(s32)
+ $sgpr3 = COPY %19(s32)
----------------
You can simplify out stuff like this, for the purpose of this test it doesn't need the readlanes
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105347/new/
https://reviews.llvm.org/D105347
More information about the llvm-commits
mailing list