[llvm-commits] [llvm] r76302 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Eli Friedman
eli.friedman at gmail.com
Sat Jul 18 02:21:53 PDT 2009
Author: efriedma
Date: Sat Jul 18 04:21:25 2009
New Revision: 76302
URL: http://llvm.org/viewvc/llvm-project?rev=76302&view=rev
Log:
Remove no-op check.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=76302&r1=76301&r2=76302&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sat Jul 18 04:21:25 2009
@@ -8453,8 +8453,7 @@
uint32_t SrcBitWidth = Src->getType()->getScalarSizeInBits();
// Canonicalize trunc x to i1 -> (icmp ne (and x, 1), 0)
- if (DestBitWidth == 1 &&
- isa<VectorType>(Ty) == isa<VectorType>(Src->getType())) {
+ if (DestBitWidth == 1) {
Constant *One = Context->getConstantInt(Src->getType(), 1);
Src = InsertNewInstBefore(BinaryOperator::CreateAnd(Src, One, "tmp"), CI);
Value *Zero = Context->getNullValue(Src->getType());
More information about the llvm-commits
mailing list