We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0db6b47 commit c1ffa81Copy full SHA for c1ffa81
llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -319,10 +319,12 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
319
case MCCFIInstruction::OpValOffset:
320
break;
321
}
322
+ assert((bool)CSRReg + (bool)CSROffset <= 1 &&
323
+ "Different saved locations for the same CSR");
324
CSRSavedLocation CSRLoc;
325
if (CSRReg)
326
CSRLoc = CSRSavedLocation::createRegister(*CSRReg);
- if (CSROffset)
327
+ else if (CSROffset)
328
CSRLoc = CSRSavedLocation::createCFAOffset(*CSROffset);
329
if (CSRLoc.isValid()) {
330
auto It = CSRLocMap.find(CFI.getRegister());
0 commit comments