diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-07-13 20:53:00 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-07-13 20:53:00 +0000 |
commit | f13aa44d4fd1af9959ea319d712606f5f2208cbf (patch) | |
tree | 9499702e10d8d23f8eb5bf64225c4a2983852a14 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 3a302cbb08723ad161166cba379b13502623238c (diff) | |
download | bcm5719-llvm-f13aa44d4fd1af9959ea319d712606f5f2208cbf.tar.gz bcm5719-llvm-f13aa44d4fd1af9959ea319d712606f5f2208cbf.zip |
Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway.
llvm-svn: 75495
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 39ad04f53e0..99f315fcda1 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8257,9 +8257,8 @@ static bool isSafeIntegerType(const Type *Ty) { } } -/// 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 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) { 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 { |