Skip to content

Conversation

broxigarchen
Copy link
Contributor

@broxigarchen broxigarchen commented Aug 22, 2025

update zext pattern with reg_sequence. This is a follow up from #154211 (comment)

@broxigarchen broxigarchen changed the title update one with reg_sequence [AMDGPU][True16][CodeGen] update zext pattern with reg_sequence Aug 22, 2025
@broxigarchen broxigarchen marked this pull request as ready for review August 22, 2025 15:43
@broxigarchen broxigarchen requested review from arsenm and jayfoad August 22, 2025 15:43
@llvmbot
Copy link
Member

llvmbot commented Aug 22, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Brox Chen (broxigarchen)

Changes

update zext pattern with reg_sequence. This is a follow up from #154211 (comment)


Full diff: https://github.com/llvm/llvm-project/pull/154952.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstructions.td (+1-3)
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td
index e8b4501226732..ed5df2c55db1b 100644
--- a/llvm/lib/Target/AMDGPU/SIInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -3106,9 +3106,7 @@ def : GCNPat<
 
 def : GCNPat<
   (i64 (DivergentUnaryFrag<zext> i16:$src)),
-  (REG_SEQUENCE VReg_64,
-    (INSERT_SUBREG (i32 (V_MOV_B32_e32 (i32 0))), VGPR_16:$src, lo16), sub0,
-    (S_MOV_B32 (i32 0)), sub1)
+  (REG_SEQUENCE VReg_64, $src, lo16, (V_MOV_B16_t16_e64 0, (i16 0), 0), hi16, (S_MOV_B32 (i32 0)), sub1)
 >;
 
 def : GCNPat<

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The high half should probably be using v_mov_b32 instead of s_mov_b32 but that's a separate change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants