Created attachment 18251 [details] Test case reduced from libreoffice's shapeattributelayer.cxx Here is an assertion encountered by Michal Meloun, while compiling LibreOffice's slideshow/source/engine/shapeattributelayer.cxx file for armv7-freebsd: Assertion failed: (!NodePtr->isKnownSentinel()), function operator*, file include/llvm/ADT/ilist_iterator.h, line 139. Attached is a reduced test case, to be compiled with: clang -cc1 -triple armv7 -S -O2 lo.cpp Specifically, the 'armv7' is important, just 'arm' or 'armv6' will not trigger the assertion.
Created attachment 18363 [details] Reduced IR test case, simply run llc This crashes with trunk.
Naive patch: ``` diff --git a/lib/Target/ARM/ARMFrameLowering.cpp b/lib/Target/ARM/ARMFrameLowering.cpp index 4f7a0ab4e22..7dd5f999843 100644 --- a/lib/Target/ARM/ARMFrameLowering.cpp +++ b/lib/Target/ARM/ARMFrameLowering.cpp @@ -479,7 +479,7 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF, if (DPRCSSize > 0) { // Since vpush register list cannot have gaps, there may be multiple vpush // instructions in the prologue. - while (MBBI->getOpcode() == ARM::VSTMDDB_UPD) { + while (MBBI != MBB.end() && MBBI->getOpcode() == ARM::VSTMDDB_UPD) { DefCFAOffsetCandidates.addInst(MBBI, sizeOfSPAdjustment(*MBBI)); LastPush = MBBI++; } ```
Thanks for the patch Vedant and sorry for the long delay. Committed in r319130
Might be nice to get this into 5.0.1 too, as it is a small change?