diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-05-19 23:06:30 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-05-19 23:06:30 +0000 |
commit | 2f21b8760e895242e6827a03e4641e0886dbd385 (patch) | |
tree | d549dba43863f39366d7fccc0e9b47029a52d046 /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | |
parent | 3de417f40836c6302449ca0eaafbf05a5c863e33 (diff) | |
download | llvm-2f21b8760e895242e6827a03e4641e0886dbd385.zip llvm-2f21b8760e895242e6827a03e4641e0886dbd385.tar.gz llvm-2f21b8760e895242e6827a03e4641e0886dbd385.tar.bz2 |
Revert r237539: "Reapply r237520 with another fix for infinite looping"
This caused PR23583.
llvm-svn: 237739
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 48ab0eb..9c2bc34 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -435,15 +435,6 @@ Instruction *InstCombiner::visitTrunc(TruncInst &CI) { if (Instruction *Result = commonCastTransforms(CI)) return Result; - // Test if the trunc is the user of a select which is part of a - // minimum or maximum operation. If so, don't do any more simplification. - // Even simplifying demanded bits can break the canonical form of a - // min/max. - Value *LHS, *RHS; - if (SelectInst *SI = dyn_cast<SelectInst>(CI.getOperand(0))) - if (matchSelectPattern(SI, LHS, RHS) != SPF_UNKNOWN) - return nullptr; - // See if we can simplify any instructions used by the input whose sole // purpose is to compute bits we don't care about. if (SimplifyDemandedInstructionBits(CI)) |