diff options
author | Nikita Popov <npopov@redhat.com> | 2024-11-25 17:06:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 17:06:58 +0100 |
commit | 4d8eb009d8ae4500940d77a64d914eed9a13b92c (patch) | |
tree | 9a7946b53c0b49fe66df2933b6ba6312ead0b898 /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | |
parent | 1b18ce57f3d9bef4a97c4dd002570b3441ac85e5 (diff) | |
download | llvm-4d8eb009d8ae4500940d77a64d914eed9a13b92c.zip llvm-4d8eb009d8ae4500940d77a64d914eed9a13b92c.tar.gz llvm-4d8eb009d8ae4500940d77a64d914eed9a13b92c.tar.bz2 |
[InstCombine] Remove SPF guard for trunc transforms (#117535)
This shouldn't be necessary anymore now that SPF patterns are
canonicalized to intrinsics.
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 6c2554e..7221c98 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -786,15 +786,6 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) { } } - // 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 *Sel = dyn_cast<SelectInst>(Src)) - if (matchSelectPattern(Sel, LHS, RHS).Flavor != 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(Trunc)) |