[llvm] 45267ec - [X86] Use getSigned() for segment offset
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 07:05:47 PST 2025
Author: Nikita Popov
Date: 2025-12-09T16:02:30+01:00
New Revision: 45267ece8fabc9eda598af47b91418fec17d5204
URL: https://github.com/llvm/llvm-project/commit/45267ece8fabc9eda598af47b91418fec17d5204
DIFF: https://github.com/llvm/llvm-project/commit/45267ece8fabc9eda598af47b91418fec17d5204.diff
LOG: [X86] Use getSigned() for segment offset
The offset here is a signed quantity.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLoweringCall.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLoweringCall.cpp b/llvm/lib/Target/X86/X86ISelLoweringCall.cpp
index a61bbe56d9c26..8db3e501f9b7e 100644
--- a/llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+++ b/llvm/lib/Target/X86/X86ISelLoweringCall.cpp
@@ -553,7 +553,7 @@ static bool hasStackGuardSlotTLS(const Triple &TargetTriple) {
static Constant* SegmentOffset(IRBuilderBase &IRB,
int Offset, unsigned AddressSpace) {
return ConstantExpr::getIntToPtr(
- ConstantInt::get(Type::getInt32Ty(IRB.getContext()), Offset),
+ ConstantInt::getSigned(Type::getInt32Ty(IRB.getContext()), Offset),
IRB.getPtrTy(AddressSpace));
}
More information about the llvm-commits
mailing list