[PATCH] D145540: [InstCombine] Reduce absolute diff from min+max+sub
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 07:38:14 PST 2023
RKSimon added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/sub-minmax.ll:1035
+ %min = call i8 @llvm.smin.i8(i8 %b, i8 %a)
+ %max = call i8 @llvm.smax.i8(i8 %b, i8 %a)
+ %ab = sub nsw i8 %max, %min
----------------
shouldn't this be:
```
%max = call i8 @llvm.smax.i8(i8 %a, i8 %b)
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145540/new/
https://reviews.llvm.org/D145540
More information about the llvm-commits
mailing list