[llvm] [AMDGPU][True16][GlobalISel] Fix v2*16 build_vector patterns (PR #151496)
Brox Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 10:48:47 PDT 2025
================
@@ -3543,15 +3543,29 @@ def : GCNPat <
(vecTy (UniformBinFrag<build_vector> (Ty undef), (Ty SReg_32:$src1))),
(S_LSHL_B32 SReg_32:$src1, (i32 16))
>;
-}
def : GCNPat <
(vecTy (DivergentBinFrag<build_vector> (Ty undef), (Ty VGPR_32:$src1))),
(vecTy (V_LSHLREV_B32_e64 (i32 16), VGPR_32:$src1))
>;
-} // End foreach Ty = ...
}
+let True16Predicate = UseRealTrue16Insts in
+def : GCNPat <
+ (vecTy (DivergentBinFrag<build_vector> (Ty undef), (Ty VGPR_32:$src1))),
+ (REG_SEQUENCE VGPR_32, (Ty (IMPLICIT_DEF)), lo16, (Ty VGPR_32:$src1), hi16)
----------------
broxigarchen wrote:
LGTM. Since I am not familiar with gisel I will leave the approval to other reviewers
https://github.com/llvm/llvm-project/pull/151496
More information about the llvm-commits
mailing list