[llvm] PPC: Fix EXTSW elimination promoting a subregister operand (PR #208051)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 08:33:47 PDT 2026


================
@@ -5499,6 +5499,13 @@ void PPCInstrInfo::promoteInstr32To64ForElimEXTSW(const Register &Reg,
     if (!OperandReg.isVirtual())
       continue;
 
+    // An operand that reads the sub_32 subregister of a 64-bit register already
+    // holds the value in a full 64-bit register.
+    if (Operand.getSubReg() == PPC::sub_32) {
----------------
arsenm wrote:

That's not relevant here? There's nothing changing here, other than how the 32-bit value is sourced. 

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


More information about the llvm-commits mailing list