[all-commits] [llvm/llvm-project] c00cab: [InstCombine] add test for or-of-icmps; NFC
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Oct 10 08:08:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c00cab878aa523e20a5dbd618e9852e191504cfe
https://github.com/llvm/llvm-project/commit/c00cab878aa523e20a5dbd618e9852e191504cfe
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-10-10 (Sun, 10 Oct 2021)
Changed paths:
M llvm/test/Transforms/InstCombine/or.ll
Log Message:
-----------
[InstCombine] add test for or-of-icmps; NFC
Commit: da210f5d3425e8877ceabaf6ed3483d52cbd7448
https://github.com/llvm/llvm-project/commit/da210f5d3425e8877ceabaf6ed3483d52cbd7448
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-10-10 (Sun, 10 Oct 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll
M llvm/test/Transforms/InstCombine/icmp-sub.ll
M llvm/test/Transforms/InstCombine/or.ll
Log Message:
-----------
[InstCombine] canonicalize "(C2 - Y) > C" as (Y + ~C2) < ~C
The test diffs show that we have better analysis/folds for 'add'
(although we should at least have the simplifications
independently, so we don't have the one-use restriction).
This is related to solving regressions that would appear in
transforms related to D111410, and that is part of a series
of enhancements that may eventually helpi solve PR34047.
https://alive2.llvm.org/ce/z/3tB9KG
define i1 @src(i8 %x, i8 %C, i8 %C2) {
%sub = sub nuw i8 %C2, %x
%r = icmp slt i8 %sub, %C
ret i1 %r
}
define i1 @tgt(i8 %x, i8 %C, i8 %C2) {
%Cnot = xor i8 %C, -1
%C2not = xor i8 %C2, -1
%add = add nuw i8 %x, %C2not
%r = icmp sgt i8 %add, %Cnot
ret i1 %r
}
Compare: https://github.com/llvm/llvm-project/compare/4ead32d1cf8e...da210f5d3425
More information about the All-commits
mailing list