[PATCH] D14489: [AArch64] Applying load pair optimization for volatile load/store

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 13:16:44 PST 2015


junbuml added a comment.

I'm not sure if I understand correctly. It will be helpful if you clarify below four cases ? 
1.I guess this must be safe if ldp read [x0, #0] and then [x0, #8] ?

  ldr x9, [x0] 
  ldr x8, [x0, #8] (volatile) 
    ; into
  ldp x9, x8, [x0]

2.Is this safe ?

  ldr x8, [x0, #8] (volatile) 
  ldr x9, [x0] 
    ; into
  ldp x9, x8, [x0]

3.Is this not safe ?

  ldr x9, [x0] (volatile)
  ldr x8, [x0, #8] (volatile) 
    ; into
  ldp x9, x8, [x0]

4.what about this case?

  ldr x9, [x0] 
  ldr x10, [x1]
  ldr x8, [x0, #8] (volatile) 
    ; into
  ldr x10, [x1]
  ldp x9, x9, [x0]


http://reviews.llvm.org/D14489





More information about the llvm-commits mailing list