From 2f21b8760e895242e6827a03e4641e0886dbd385 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 19 May 2015 23:06:30 +0000 Subject: Revert r237539: "Reapply r237520 with another fix for infinite looping" This caused PR23583. llvm-svn: 237739 --- llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp') 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(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)) -- cgit v1.1