Skip to content

Commit 3d23b74

Browse files
committed
AArch64: fall back to SDAG for instructions with emulated TLS variables
1 parent cd70802 commit 3d23b74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2838,8 +2838,12 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
28382838
assert(OpFlags == AArch64II::MO_GOT);
28392839
} else {
28402840
GV = I.getOperand(1).getGlobal();
2841-
if (GV->isThreadLocal())
2841+
if (GV->isThreadLocal()) {
2842+
// We don't support instructions with emulated TLS variables yet
2843+
if (TM.useEmulatedTLS())
2844+
return false;
28422845
return selectTLSGlobalValue(I, MRI);
2846+
}
28432847
OpFlags = STI.ClassifyGlobalReference(GV, TM);
28442848
}
28452849

0 commit comments

Comments
 (0)