[PATCH] D33578: [DAGCombiner] use narrow load to avoid vector extract

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 06:47:38 PDT 2017


spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14470
+
+  auto *Ld = dyn_cast<LoadSDNode>(N->getOperand(0));
+  auto *ExtIdx = dyn_cast<ConstantSDNode>(N->getOperand(1));
----------------
niravd wrote:
> You should use BaseIndexOffset for Offset extraction. This may be better deferred to another patch with a TODO as well. 
Ah, right - I forgot about that API. I'm running up my TODO tab, but yes, let me tack on one more. :)

FWIW, this part of the code is also based on code from x86 lowering, so there may be more refactoring opportunity.


https://reviews.llvm.org/D33578





More information about the llvm-commits mailing list