[llvm-commits] [llvm] r75495 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Jul 13 13:53:00 PDT 2009
Author: efriedma
Date: Mon Jul 13 15:53:00 2009
New Revision: 75495
URL: http://llvm.org/viewvc/llvm-project?rev=75495&view=rev
Log:
Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway.
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=75495&r1=75494&r2=75495&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 13 15:53:00 2009
@@ -8257,9 +8257,8 @@
}
}
-/// Only the TRUNC, ZEXT, SEXT, and BITCAST can both operand and result as
-/// integer types. This function implements the common transforms for all those
-/// cases.
+/// Only the TRUNC, ZEXT, SEXT. This function implements the common transforms
+/// for all those cases.
/// @brief Implement the transforms common to CastInst with integer operands
Instruction *InstCombiner::commonIntCastTransforms(CastInst &CI) {
if (Instruction *Result = commonCastTransforms(CI))
@@ -9004,10 +9003,7 @@
const Type *SrcTy = Src->getType();
const Type *DestTy = CI.getType();
- if (SrcTy->isInteger() && DestTy->isInteger()) {
- if (Instruction *Result = commonIntCastTransforms(CI))
- return Result;
- } else if (isa<PointerType>(SrcTy)) {
+ if (isa<PointerType>(SrcTy)) {
if (Instruction *I = commonPointerCastTransforms(CI))
return I;
} else {
More information about the llvm-commits
mailing list