[PATCH] D71359: Fix assertion failure in getMemOperandWithOffsetWidth

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 02:43:52 PST 2019


sdesmalen added inline comments.


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


================
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
----------------
nit: Can you add a comment clarifying which instruction (that is not a load or store) would have caused the assert to fail?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71359





More information about the llvm-commits mailing list