Skip to content

Commit c9ea0b0

Browse files
committed
Update target flag checks
1 parent cbfe29b commit c9ea0b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
15171517
// machine operand (which is a TargetGlobalTLSAddress) is expected to be
15181518
// the same operand for both loads and stores.
15191519
for (const MachineOperand &TempMO : MI->operands()) {
1520-
if (((TempMO.getTargetFlags() & PPCII::MO_TPREL_FLAG) != 0) &&
1520+
if (((TempMO.getTargetFlags() == PPCII::MO_TPREL_FLAG)) &&
15211521
TempMO.getOperandNo() == 1)
15221522
OpNum = 1;
15231523
}

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7601,7 +7601,7 @@ static bool isEligibleToFoldADDIForLocalExecAccesses(SDNode *N,
76017601
// The local-exec TLS variable should only have the MO_TPREL_FLAG target flag,
76027602
// so this optimization is not performed otherwise if the flag is not set.
76037603
unsigned TargetFlags = GA->getTargetFlags();
7604-
if ((TargetFlags & PPCII::MO_TPREL_FLAG) == 0)
7604+
if (TargetFlags != PPCII::MO_TPREL_FLAG)
76057605
return false;
76067606

76077607
// If all conditions are satisfied, the ADDI is valid for folding.

0 commit comments

Comments
 (0)