[llvm] [AArch64] Use a load instead of a store for inline stack probes (PR #170855)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 5 09:57:07 PST 2026
momchil-velikov wrote:
> Can we mark the loads as volatile to make sure they are not removed by any future optimization? (It doesn't happen at the moment, but these do looks like dead operations).
Sounds good, perhaps like
```
.addMemOperand(
MF.getMachineMemOperand(
MachinePointerInfo::getUnknownStack(MF),
MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile,
8, Align(8)));
```
I wonder if instead of `MachineMemOperand::MOVolatile` the lack of `MachineMemOperand::MODereferencable` would convey the intent more precisely?
Also, don't forget this load: https://github.com/llvm/llvm-project/blob/3dd53783578a0552372e8b14b557b36b7e30a1ed/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp#L11208
https://github.com/llvm/llvm-project/pull/170855
More information about the llvm-commits
mailing list