[PATCH] D71359: Fix assertion failure in getMemOperandWithOffsetWidth

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 03:16:24 PST 2019


kristof.beyls marked 4 inline comments as done.
kristof.beyls added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:2032
 
   assert((BaseOp->isReg() || BaseOp->isFI()) &&
          "getMemOperandWithOffset only supports base "
----------------
sdesmalen wrote:
> Should this return false as well, instead of asserting? And if so, is there a way to construct a test for that?
Thanks - good catch!


================
Comment at: llvm/test/CodeGen/AArch64/machine-sink-getmemoperandwithoffset.mir:34
+body:             |
+  ; Just check that the pass didn't crash/assert.
+  ; CHECK-LABEL: name: g
----------------
sdesmalen wrote:
> nit: Can you add a comment clarifying which instruction (that is not a load or store) would have caused the assert to fail?
I now added a comment that hopefully is useful for people reading this test in the future, see a few lines below.


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

https://reviews.llvm.org/D71359





More information about the llvm-commits mailing list