[ARM64] Fix wrong comment in load/store optimization pass.
authorTilmann Scheller <t.scheller@samsung.com>
Fri, 16 May 2014 16:50:13 +0000 (16:50 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Fri, 16 May 2014 16:50:13 +0000 (16:50 +0000)
ldr x1, [x0, #64]
add x0, x0, #64
 ->
ldr x1, [x0], #64

is not a valid transformation, the correct transformation (and what the code actually does) is:

ldr x1, [x0, #64]
add x0, x0, #64
 ->
ldr x1, [x0, #64]!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208998 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM64/ARM64LoadStoreOptimizer.cpp

index 40b39126fadc11f4c8591689428042987c947d1d..9a8e1c3d91c07991c6ed7a73605a79d7d9974026 100644 (file)
@@ -892,7 +892,7 @@ bool ARM64LoadStoreOpt::optimizeBlock(MachineBasicBlock &MBB) {
       // ldr x1, [x0, #64]
       // add x0, x0, #64
       //   merged into:
-      // ldr x1, [x0], #64
+      // ldr x1, [x0, #64]!
 
       // The immediate in the load/store is scaled by the size of the register
       // being loaded. The immediate in the add we're looking for,