[PATCH] D34077: DAGCombine: Combine BUILD_VECTOR to TRUNCATE
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 05:30:43 PDT 2017
delena added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14192
+ // TODO: Allow undef elements in some cases?
+ if (any_of(make_range(N->op_begin(), N->op_end()), [VT](SDValue Op) {
+ return Op.getOpcode() != ISD::EXTRACT_VECTOR_ELT ||
----------------
Code simplification:
any_of(N->operands() ..
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14289
+ if (SDValue V = reduceBuildVecToTrunc(N))
+ return V;
----------------
I'd put isDesirable..() here, before call to reduceBuildVecToTrunc(), with N node as parameter.
https://reviews.llvm.org/D34077
More information about the llvm-commits
mailing list