[PATCH] D98152: [InstCombine] Canonicalize SPF to min/max intrinsics

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 26 07:18:07 PDT 2021


xbolva00 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/select_meta.ll:163
 ; CHECK-LABEL: @test72(
-; CHECK-NEXT:    [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], 11
-; CHECK-NEXT:    [[RETVAL:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 11, !prof !2
-; CHECK-NEXT:    ret i32 [[RETVAL]]
+; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.smin.i32(i32 [[X:%.*]], i32 92)
+; CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.smin.i32(i32 [[TMP1]], i32 11)
----------------
Regression.


================
Comment at: llvm/test/Transforms/InstCombine/sub-minmax.ll:160
+; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.umax.i32(i32 [[BI:%.*]], i32 [[A:%.*]])
+; CHECK-NEXT:    [[X:%.*]] = sub i32 [[TMP1]], [[A]]
+; CHECK-NEXT:    ret i32 [[X]]
----------------
Regression


================
Comment at: llvm/test/Transforms/InstCombine/sub-minmax.ll:23
+; CHECK-NEXT:    [[X:%.*]] = sub i32 [[NOT]], [[TMP1]]
+; CHECK-NEXT:    ret i32 [[X]]
 ;
----------------
nikic wrote:
> Regression
Not done?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98152/new/

https://reviews.llvm.org/D98152



More information about the llvm-commits mailing list