[PATCH] D13655: DAGCombiner: Combine extract_vector_elt from build_vector
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 14:39:39 PDT 2015
arsenm added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11893
@@ +11892,3 @@
+ TLI.aggressivelyPreferBuildVectorSources(VT))) {
+ return InVec.getOperand(ConstEltNo->getZExtValue());
+ }
----------------
arsenm wrote:
> RKSimon wrote:
> > You may need to confirm that the operand value type is the same as the BUILD_VECTOR scalar value type - implicit truncation may be occurring.
> Is this really supposed to be allowed? I would consider mismatched vector element and destination vector types to be a bug. The comment in getConstant made me very unhappy
I also think this might be redundant with isTypeLegal on the element type. If this case is really allowed, I think it only happens if the scalar type is not legal and the vector is
http://reviews.llvm.org/D13655
More information about the llvm-commits
mailing list