[PATCH] D33137: [DAGCombiner] use narrow vector ops to eliminate concat/extract (PR32790)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 11:13:28 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14470
+ "Extract index is not a multiple of the vector length.");
+ if (Extract->getOperand(0).getValueSizeInBits() != VT.getSizeInBits() * 2)
+ return SDValue();
----------------
Could you use isExtractSubvectorCheap instead here?
We might even need a isExtractSubvectorFree option as well...
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14476
+ SDValue BinOp = Extract->getOperand(0);
+ if (BinOp.getOpcode() == ISD::BITCAST)
+ BinOp = BinOp.getOperand(0);
----------------
I'm starting to think that X86ISelLowering's peekThroughBitcasts and peekThroughOneUseBitcasts helpers should be exposed globally.
https://reviews.llvm.org/D33137
More information about the llvm-commits
mailing list