Skip to content

Commit 9acad76

Browse files
committed
Update assert to early exit
1 parent 079869e commit 9acad76

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,17 +1555,15 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
15551555
// or a load/store instruction (that directly loads or stores off of the
15561556
// thread pointer) with an immediate operand having the MO_TPREL_FLAG.
15571557
// Such instructions do not otherwise arise.
1558+
if (!HasAIXSmallLocalExecTLS)
1559+
break;
15581560
bool IsMIADDI8 = MI->getOpcode() == PPC::ADDI8;
15591561
unsigned OpNum = IsMIADDI8 ? 2 : 1;
15601562
const MachineOperand &MO = MI->getOperand(OpNum);
15611563
unsigned Flag = MO.getTargetFlags();
15621564
if (Flag == PPCII::MO_TPREL_FLAG ||
15631565
Flag == PPCII::MO_GOT_TPREL_PCREL_FLAG ||
15641566
Flag == PPCII::MO_TPREL_PCREL_FLAG) {
1565-
assert(HasAIXSmallLocalExecTLS &&
1566-
"addi, or load/stores with thread-pointer only expected with "
1567-
"local-exec small TLS");
1568-
15691567
LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
15701568

15711569
const MCExpr *Expr = getAdjustedLocalExecExpr(MO, MO.getOffset());

0 commit comments

Comments
 (0)