diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-02 17:23:38 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-02 17:23:38 +0000 |
| commit | 5543a856ff65ddd64a07f680164673a24aa6c3a6 (patch) | |
| tree | e63354584e88b741028aa6129e72e910e9c2cdd1 /lib/Transforms | |
| parent | ce4eaecb2ee2d52edde5f607888c052be2e5b950 (diff) | |
Replacing a cast with another one does not reduce the number of
casts in the input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 806c6e4da9..e843074920 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6384,12 +6384,10 @@ static bool CanEvaluateInDifferentType(Value *V, const IntegerType *Ty, case Instruction::SExt: case Instruction::Trunc: // If this is the same kind of case as our original (e.g. zext+zext), we - // can safely eliminate it. - break; // FIXME: This causes PR1594 - if (I->getOpcode() == CastOpc) { - ++NumCastsRemoved; + // can safely replace it. Note that replacing it does not reduce the number + // of casts in the input. + if (I->getOpcode() == CastOpc) return true; - } break; default: // TODO: Can handle more cases here. |
