[PATCH] D98152: [InstCombine] Canonicalize SPF to min/max intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 08:41:52 PST 2022
spatel added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/minmax-fold.ll:283
+; CHECK-NEXT: [[TMP2:%.*]] = call i32 @llvm.smin.i32(i32 [[TMP1]], i32 11)
+; CHECK-NEXT: ret i32 [[TMP2]]
;
----------------
spatel wrote:
> nikic wrote:
> > nikic wrote:
> > > Regression
> > This looks like a valuable fold.
> Agree - I'll work on that one.
> There should be some family of patterns like this:
> https://alive2.llvm.org/ce/z/8nsAMp
On 2nd thought, this is just a reassociation/simplify fold when we have 2 constant operands and matching min/max:
https://alive2.llvm.org/ce/z/wW5HVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98152/new/
https://reviews.llvm.org/D98152
More information about the llvm-commits
mailing list