[PATCH] D33578: [DAGCombiner] use narrow load to avoid vector extract
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 19:39:16 PDT 2017
niravd added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14472
+ auto *ExtIdx = dyn_cast<ConstantSDNode>(N->getOperand(1));
+ if (!Ld || !Ld->hasOneUse() || Ld->isVolatile() || !ExtIdx)
+ return SDValue();
----------------
The hasOneUse restriction seems overly conservative for most Targets and you've already the logic to deal with duplicated loads. This seems like a good place for "isSubVectorExtractFree".
https://reviews.llvm.org/D33578
More information about the llvm-commits
mailing list