Skip to content

Commit

Permalink
[X86] Add TODO for getTargetConstantFromBasePtr to support non-zero o…
Browse files Browse the repository at this point in the history
…ffsets.

As noted on #66991 - we sometimes share vector constant pool entries, referencing subvectors within them via pointer offsets
  • Loading branch information
RKSimon committed Apr 30, 2024
1 parent 066dc1e commit 2cb97c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4639,6 +4639,7 @@ static ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) {
return dyn_cast<ConstantPoolSDNode>(Ptr);
}

// TODO: Add support for non-zero offsets.
static const Constant *getTargetConstantFromBasePtr(SDValue Ptr) {
ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr);
if (!CNode || CNode->isMachineConstantPoolEntry() || CNode->getOffset() != 0)
Expand Down

0 comments on commit 2cb97c7

Please sign in to comment.