aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-13 20:53:00 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-13 20:53:00 +0000
commit5013d3f69641b453d354073dc02c4c9306f34e75 (patch)
treedcd61a9bd8a2ab4edfdae5f2e9b6444f2d6c54bc /lib/Transforms/Scalar/InstructionCombining.cpp
parentd43a828295cd70ca992993c25e5f7e9abc6e8e8d (diff)
downloadexternal_llvm-5013d3f69641b453d354073dc02c4c9306f34e75.zip
external_llvm-5013d3f69641b453d354073dc02c4c9306f34e75.tar.gz
external_llvm-5013d3f69641b453d354073dc02c4c9306f34e75.tar.bz2
Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 39ad04f..99f315f 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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 {