mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 14:36:34 +00:00
Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway. llvm-svn: 75495
This commit is contained in:
parent
bf3719359b
commit
832f33550c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user