[PATCH] D80161: [CodeGen] Add support for multiple memory operands in MachineInstr::mayAlias

Jean-Michel Gorius via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 03:13:01 PDT 2020


Kayjukh marked an inline comment as done.
Kayjukh added a comment.

In D80161#2042626 <https://reviews.llvm.org/D80161#2042626>, @efriedma wrote:

> I'd like to see an MIR test that shows the aliasing check actually working correctly.


I will have to find something that fits in a test case and covers this case. Working on it!



================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1280
+        int64_t LowWidth = (MinOffset == OffsetA) ? WidthA : WidthB;
+        return (MinOffset + LowWidth > MaxOffset);
+      }
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80161/new/

https://reviews.llvm.org/D80161





More information about the llvm-commits mailing list