[PATCH] D85230: [PatternMatch] allow intrinsic form of min/max with existing matchers
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 14:18:23 PDT 2020
spatel added a comment.
In D85230#2194521 <https://reviews.llvm.org/D85230#2194521>, @RKSimon wrote:
> Maybe make it clear at the start of InstCombinerImpl::foldSelectOpOp where we use the matchers that we can safely use the matchers for the select(icmp) pattern OR the intrinsics?
In that code, we already know that the value that we are matching is a select, so there's no chance of matching an intrinsic there:
Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI,
Instruction *FI) {
if ((match(&SI, m_SMin(m_Value(), m_Value())) ||
We should eventually remove that code. Ie, once we canonicalize to the intrinsics, we will get to remove min/max crippling checks like that one because we won't have the cmp+sel patterns that correspond to min/max.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85230/new/
https://reviews.llvm.org/D85230
More information about the llvm-commits
mailing list