Skip to content

Commit 4d8eb00

Browse files
authored
[InstCombine] Remove SPF guard for trunc transforms (#117535)
This shouldn't be necessary anymore now that SPF patterns are canonicalized to intrinsics.
1 parent 1b18ce5 commit 4d8eb00

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -786,15 +786,6 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) {
786786
}
787787
}
788788

789-
// Test if the trunc is the user of a select which is part of a
790-
// minimum or maximum operation. If so, don't do any more simplification.
791-
// Even simplifying demanded bits can break the canonical form of a
792-
// min/max.
793-
Value *LHS, *RHS;
794-
if (SelectInst *Sel = dyn_cast<SelectInst>(Src))
795-
if (matchSelectPattern(Sel, LHS, RHS).Flavor != SPF_UNKNOWN)
796-
return nullptr;
797-
798789
// See if we can simplify any instructions used by the input whose sole
799790
// purpose is to compute bits we don't care about.
800791
if (SimplifyDemandedInstructionBits(Trunc))

0 commit comments

Comments
 (0)