[PATCH] D69514: [InstCombine] Expand usub_sat patterns to handle constants
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 08:53:53 PDT 2019
lebedev.ri added a comment.
Thank you for looking into this.
================
Comment at: llvm/test/Transforms/InstCombine/unsigned_saturated_sub.ll:214-215
; CHECK-LABEL: @max_sub_ult_c2(
-; CHECK-NEXT: [[CMP:%.*]] = icmp ult i32 [[A:%.*]], 2
-; CHECK-NEXT: [[SUB:%.*]] = add i32 [[A]], -2
-; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 [[SUB]], i32 0
----------------
In this pattern either one of these two instructions must be one-use and go away.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69514/new/
https://reviews.llvm.org/D69514
More information about the llvm-commits
mailing list