[PATCH] D22085: Bug 28444: Fix assertion when extract_vector_elt has mismatched type

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 01:15:36 PDT 2016


hfinkel added a subscriber: hfinkel.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12411
@@ -12411,2 +12410,3 @@
+      EltNo == InVec.getOperand(2) && NVT == VT.getScalarType())
     return InVec.getOperand(1);
 
----------------
Instead of disabling the transformation, you should be able to replace:
  return InVec.getOperand(1);
with:
  return DAG.getAnyExtOrTrunc(InVec.getOperand(1), SDLoc(N), NVT);

(I double-checked DAGTypeLegalizer::ScalarizeVecOp_EXTRACT_VECTOR_ELT, and it uses an ANY_EXTEND for this case).



http://reviews.llvm.org/D22085





More information about the llvm-commits mailing list