Skip to content

Commit 3974d89

Browse files
committed
[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.
1 parent 52820bd commit 3974d89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4554,15 +4554,15 @@ static SDValue getShuffleVectorZeroOrUndef(SDValue V2, int Idx,
45544554
return DAG.getVectorShuffle(VT, SDLoc(V2), V1, V2, MaskVec);
45554555
}
45564556

4557-
static const ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
4557+
static ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
45584558
if (Ptr.getOpcode() == X86ISD::Wrapper ||
45594559
Ptr.getOpcode() == X86ISD::WrapperRIP)
45604560
Ptr = Ptr.getOperand(0);
45614561
return dyn_cast<ConstantPoolSDNode>(Ptr);
45624562
}
45634563

45644564
static const Constant *getTargetConstantFromBasePtr(SDValue Ptr) {
4565-
const ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr);
4565+
ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr);
45664566
if (!CNode || CNode->isMachineConstantPoolEntry() || CNode->getOffset() != 0)
45674567
return nullptr;
45684568
return CNode->getConstVal();

0 commit comments

Comments
 (0)