[llvm] [CodeGen] Drop tail-local IR values from memoperands in tail duplication (PR #226768)
MMS IT GmbH via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 05:30:21 PDT 2026
mms-it-ch wrote:
Thanks, I tried that. Enabling cross-iteration mode for `AAForDep` in `ScheduleDAGInstrs::buildSchedGraph` fixes the original miscompile: in the NIST RW103A case the load of the branch target now stays after the store of that target, and only 6 lines of the whole function change.
It is not free, though: in cross-iteration mode BasicAA can no longer disambiguate PHI-based pointers within a single iteration either. In the SystemZ tests one case changes (`loop-01.ll`, `f8`: the memcpy loop gets `vl`/`vst` interleaved with the `mvc`s instead of four `mvc`s in a row). Since this affects every target with `useAA()`, more tests may change on ARM, PowerPC, Hexagon etc.; I only have a SystemZ build here.
Would you prefer that approach, with the test updated (and possibly limited to blocks that end in an indirect branch, or to blocks that tail duplication changed)? Or should I keep fixing the memory operands in TailDup? I'm happy to rework the PR either way.
https://github.com/llvm/llvm-project/pull/226768
More information about the llvm-commits
mailing list