Improve support for vector casts in LLVM IR and CodeGen.

llvm-svn: 54784
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index bdeffba..9682a2f3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3146,6 +3146,10 @@
   MVT VT = N->getValueType(0);
   MVT EVT = N->getValueType(0);
 
+  // This transformation isn't valid for vector loads.
+  if (VT.isVector())
+    return SDValue();
+
   // Special case: SIGN_EXTEND_INREG is basically truncating to EVT then
   // extended to VT.
   if (Opc == ISD::SIGN_EXTEND_INREG) {