[llvm] [AMDGPU][True16][CodeGen] stop emitting spgr_lo16 from isel (PR #144819)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 06:49:22 PDT 2025


================
@@ -1471,17 +1471,34 @@ def : GCNPat<
 >;
 
 def : GCNPat<
-  (i64 (anyext i16:$src)),
+  (i64 (UniformUnaryFrag<anyext> i16:$src)),
+  (REG_SEQUENCE VReg_64,
+     (i32 (COPY $src)), sub0,
+     (V_MOV_B32_e32 (i32 0)), sub1)
----------------
broxigarchen wrote:

I didn't check the reason behind this, but just copy what we have in the code base from Non-true16 flow to here (see line 1443). I am not sure why this is using VReg_64 either hmmm. If we want to change it, maybe I can change it in a different patch

These patterns did not solve the issue, but I think it helps a little as it generate less number of mismatched copy.

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


More information about the llvm-commits mailing list