[llvm] 3974d89 - [X86] getTargetConstantPoolFromBasePtr - drop const qualifier
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 20 02:40:27 PST 2023
Author: Simon Pilgrim
Date: 2023-12-20T10:40:13Z
New Revision: 3974d89bde66a2ec61261b969b51993da81205c7
URL: https://github.com/llvm/llvm-project/commit/3974d89bde66a2ec61261b969b51993da81205c7
DIFF: https://github.com/llvm/llvm-project/commit/3974d89bde66a2ec61261b969b51993da81205c7.diff
LOG: [X86] getTargetConstantPoolFromBasePtr - drop const qualifier
Return ConstantPoolSDNode instead of const ConstantPoolSDNode - doesn't affect the accessors at all and makes it easier to use result in calls expecting a SDNode.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index b80c766c7ffa75..ecfff1e1a1790c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4554,7 +4554,7 @@ static SDValue getShuffleVectorZeroOrUndef(SDValue V2, int Idx,
return DAG.getVectorShuffle(VT, SDLoc(V2), V1, V2, MaskVec);
}
-static const ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
+static ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
if (Ptr.getOpcode() == X86ISD::Wrapper ||
Ptr.getOpcode() == X86ISD::WrapperRIP)
Ptr = Ptr.getOperand(0);
@@ -4562,7 +4562,7 @@ static const ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
}
static const Constant *getTargetConstantFromBasePtr(SDValue Ptr) {
- const ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr);
+ ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr);
if (!CNode || CNode->isMachineConstantPoolEntry() || CNode->getOffset() != 0)
return nullptr;
return CNode->getConstVal();
More information about the llvm-commits
mailing list