[llvm] [AArch64]Fix invalid use of ld1/st1 in stack alloc (PR #105518)
    Sander de Smalen via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep  4 06:01:02 PDT 2024
    
    
  
================
@@ -3355,8 +3360,8 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters(
           MachineMemOperand::MOStore, Size, Alignment));
       MIB.addReg(PnReg);
       MIB.addReg(AArch64::SP)
-          .addImm(RPI.Offset) // [sp, #offset*scale],
-                              // where factor*scale is implicit
+          .addImm(RPI.Offset / 2) // [sp, #offset*2*scale],
+                                  // where scale is implicit
----------------
sdesmalen-arm wrote:
nit:
```suggestion
                                  // where 2*scale is implicit
```
When it interprets (or prints) the immediate in the instruction, it multiplies the immediate by 2 and then interprets its as a 'mul vl' value. I think that means the 2 * scale is implicit?
https://github.com/llvm/llvm-project/pull/105518
    
    
More information about the llvm-commits
mailing list