[llvm] [AMDGPU][True16][CodeGen] sext i16 inreg in true16 mode (PR #144024)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 08:19:12 PDT 2025


================
@@ -2583,6 +2585,23 @@ def : GCNPat <
   (i16 (DivergentSextInreg<i8> i16:$src)),
   (V_BFE_I32_e64 $src, (i32 0), (i32 8))
 >;
+}
+
+let True16Predicate = UseRealTrue16Insts in {
+def : GCNPat <
+  (i16 (DivergentSextInreg<i1> i16:$src)),
+  (V_BFE_I32_e64
+   (REG_SEQUENCE VGPR_32, VGPR_16:$src, lo16, (i16 (IMPLICIT_DEF)), hi16),
+   (i32 0), (i32 1))
+>;
----------------
broxigarchen wrote:

ping! This patch is required to unblock a downstream repo so might need some input on this Thanks!

https://github.com/llvm/llvm-project/pull/144024


More information about the llvm-commits mailing list