[llvm] [CodeGen] Get stack alignment from TargetFrameLowering (NFCI) (PR #105477)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 00:36:41 PDT 2024
================
@@ -9241,9 +9242,10 @@ LegalizerHelper::lowerMemmove(MachineInstr &MI, Register Dst, Register Src,
// Don't promote to an alignment that would require dynamic stack
// realignment.
const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
- if (!TRI->hasStackRealignment(MF))
- while (NewAlign > Alignment && DL.exceedsNaturalStackAlignment(NewAlign))
- NewAlign = NewAlign.previous();
+ if (NewAlign > Alignment && !TRI->hasStackRealignment(MF)) {
+ const TargetFrameLowering *TFL = MF.getSubtarget().getFrameLowering();
----------------
s-barannikov wrote:
I don't like having two of them either, but AIUI the one from DataLayout is more of a heuristic.
https://github.com/llvm/llvm-project/pull/105477
More information about the llvm-commits
mailing list