[PATCH] D98152: [InstCombine] Canonicalize SPF to min/max intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 26 06:53:42 PDT 2021
spatel added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/max-of-nots.ll:356
+; CHECK-NEXT: [[YK:%.*]] = sub i8 [[NOTB]], [[K]]
+; CHECK-NEXT: call void @use(i8 [[CK]], i8 [[MK]], i8 [[YK]], i8 [[K]])
; CHECK-NEXT: ret void
----------------
nikic wrote:
> These all still regress
There's probably still at least one gap in the matching for this kind of larger pattern, but we should get all of the existing tests after:
28afaed691a0a7ca
================
Comment at: llvm/test/Transforms/InstCombine/minmax-fold.ll:1111
+; CHECK-NEXT: [[U5:%.*]] = add nuw nsw i32 [[U4]], 15
+; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.umax.i32(i32 [[U5]], i32 255)
+; CHECK-NEXT: [[R:%.*]] = trunc i32 [[TMP1]] to i8
----------------
xbolva00 wrote:
> Regression.
This should make it better:
6063e6b499c7829b
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98152/new/
https://reviews.llvm.org/D98152
More information about the llvm-commits
mailing list