[llvm] a9670fb - [PowerPC] Fix assertion of InstDisp for local-exec TLS. NFC.
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 21:55:12 PST 2024
Author: Kai Luo
Date: 2024-02-05T13:54:36+08:00
New Revision: a9670fb0de1cb87fb1556e8cf28d528171f5bd9b
URL: https://github.com/llvm/llvm-project/commit/a9670fb0de1cb87fb1556e8cf28d528171f5bd9b
DIFF: https://github.com/llvm/llvm-project/commit/a9670fb0de1cb87fb1556e8cf28d528171f5bd9b.diff
LOG: [PowerPC] Fix assertion of InstDisp for local-exec TLS. NFC.
Fixes https://github.com/llvm/llvm-project/issues/80557.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index a965d6b70d2d9..483cd788ebfe0 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -1646,7 +1646,7 @@ const MCExpr *PPCAsmPrinter::getAdjustedLocalExecExpr(const MachineOperand &MO,
ptr
diff _t Delta = ((FinalAddress + 32768) & ~0xFFFF);
// Check that the total instruction displacement fits within [-32768,32768).
[[maybe_unused]] ptr
diff _t InstDisp = TLSVarAddress + Offset - Delta;
- assert(((InstDisp < 32768) ||
+ assert(((InstDisp < 32768) &&
(InstDisp >= -32768)) &&
"Expecting the instruction displacement for local-exec TLS "
"variables to be between [-32768, 32768)!");
More information about the llvm-commits
mailing list