[llvm] [CodeGen] Treat hasOrderedMemoryRef as implying arbitrary loads or stores (PR #182000)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 06:53:14 PST 2026


================
@@ -35,13 +35,13 @@ define void @foo_non_streaming_pass_arg(ptr %arg) {
 ; CHECK-NEXT:    .cfi_offset b14, -88
 ; CHECK-NEXT:    .cfi_offset b15, -96
 ; CHECK-NEXT:    addvl sp, sp, #-1
+; CHECK-NEXT:    ldr z0, [x0]
----------------
jayfoad wrote:

Before this patch, machine-sink can sink this LDR past the ADJCALLSTACKDOWN. After this patch it cannot because ADJCALLSTACKDOWN has side effects.
```
  %1:zpr = LDR_ZXI %0:gpr64common, 0 :: (load (<vscale x 1 x s128>) from %ir.arg)
  ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
```

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


More information about the llvm-commits mailing list