diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-02 17:38:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-02 17:38:55 +0000 |
commit | 872265ee1be8f5525935b0cc712acf53d3ba5fe0 (patch) | |
tree | 08cb00ad1afe59e0e5fc8f1faa7942feb16ba6b4 /lib/Transforms/LevelRaise.cpp | |
parent | 1f8d13c361ea7c62198fdede9781e38b32faa451 (diff) |
ExprTypeConvert will already do this transformation, no need to specialize
it here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r-- | lib/Transforms/LevelRaise.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 2a6c6da20d..cc684b5f15 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -47,7 +47,6 @@ static inline bool isReinterpretingCast(const CastInst *CI) { } - // Peephole optimize the following instructions: // %t1 = cast ? to x * // %t2 = add x * %SP, %t1 ;; Constant must be 2nd operand @@ -191,26 +190,6 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { return true; } - // Peephole optimize the following instructions: - // %tmp = cast <ty> %V to <ty2> - // %V = cast <ty2> %tmp to <ty3> ; Where ty & ty2 are same size - // - // Into: cast <ty> %V to <ty3> - // - if (SrcI) - if (CastInst *CSrc = dyn_cast<CastInst>(SrcI)) - if (isReinterpretingCast(CI) + isReinterpretingCast(CSrc) < 2) { - // We can only do c-c elimination if, at most, one cast does a - // reinterpretation of the input data. - // - // If legal, make this cast refer the the original casts argument! - // - PRINT_PEEPHOLE2("cast-cast:in ", CI, CSrc); - CI->setOperand(0, CSrc->getOperand(0)); - PRINT_PEEPHOLE1("cast-cast:out", CI); - return true; - } - // Check to see if it's a cast of an instruction that does not depend on the // specific type of the operands to do it's job. if (!isReinterpretingCast(CI)) { |