[llvm-commits] Patch for #9165

Rotem, Nadav nadav.rotem at intel.com
Tue Feb 8 04:34:25 PST 2011


Hi,

Here is a fix for  #9165.   http://llvm.org/bugs/show_bug.cgi?id=9165
More details inside.


Index: DAGCombiner.cpp
===================================================================
--- DAGCombiner.cpp     (revision 124985)
+++ DAGCombiner.cpp     (working copy)
@@ -6377,7 +6377,8 @@

   // If the invec is a BUILD_VECTOR and if EltNo is a constant, build a new
   // vector with the inserted element.
-  if (InVec.getOpcode() == ISD::BUILD_VECTOR && isa<ConstantSDNode>(EltNo)) {
+  if (!LegalOperations && InVec.getOpcode() == ISD::BUILD_VECTOR &&
+      isa<ConstantSDNode>(EltNo)) {
     unsigned Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
     SmallVector<SDValue, 8> Ops(InVec.getNode()->op_begin(),
                                 InVec.getNode()->op_end());

Cheers,
Nadav
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110208/0337f450/attachment.html>


More information about the llvm-commits mailing list