Skip to content

Commit 4819126

Browse files
committed
AArch64: fall back to SDAG for instructions with emulated TLS variables
1 parent d8bcb53 commit 4819126

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
@@ -2960,8 +2960,12 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
29602960
assert(OpFlags == AArch64II::MO_GOT);
29612961
} else {
29622962
GV = I.getOperand(1).getGlobal();
2963-
if (GV->isThreadLocal())
2963+
if (GV->isThreadLocal()) {
2964+
// We don't support instructions with emulated TLS variables yet
2965+
if (TM.useEmulatedTLS())
2966+
return false;
29642967
return selectTLSGlobalValue(I, MRI);
2968+
}
29652969
OpFlags = STI.ClassifyGlobalReference(GV, TM);
29662970
}
29672971

0 commit comments

Comments
 (0)