InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
llvm-svn: 94280
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index 8ff36cb..e72e48c 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -2079,8 +2079,9 @@
return secondOp;
case 3:
// no-op cast in second op implies firstOp as long as the DestTy
- // is integer
- if (DstTy->isInteger())
+ // is integer and we are not converting between a vector and a
+ // non vector type
+ if (SrcTy->getTypeID() != Type::VectorTyID && DstTy->isInteger())
return firstOp;
return 0;
case 4: