[PATCH] D80161: [CodeGen] Add support for multiple memory operands in MachineInstr::mayAlias
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 03:45:13 PDT 2020
dmgreen added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1280
+ int64_t LowWidth = (MinOffset == OffsetA) ? WidthA : WidthB;
+ return (MinOffset + LowWidth > MaxOffset);
+ }
----------------
Kayjukh wrote:
> dmgreen wrote:
> > It would seem incorrect to return false here now? Same for the pseudo values above.
> Yes, we should only return if the result is true. For the pseudo-values I guess we can just skip the checks entirely and only update the value of `SameVal`.
> It leads to more test cases failing because of instruction ordering. I will update the diff as soon as I fixed all of these.
If the code before worked with two mmo's, would it be possible to do something like:
auto HasAlias = [](MMOa, MMOb) {
old code as it was before return true/false;
};
for (auto &MMOa : memoperands()) {
for (auto &MMOb : Other.memoperands()) {
if (HasAlias(MMOa, MMOb))
return true;
return false;
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80161/new/
https://reviews.llvm.org/D80161
More information about the llvm-commits
mailing list