diff options
author | Sanjay Patel <spatel@rotateright.com> | 2023-01-25 16:27:29 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2023-01-26 08:58:45 -0500 |
commit | 0ef7cbc319ee6488a47fda1b45b0d7170722df31 (patch) | |
tree | c43fb17796ef99d4c8e02068f89cc1104a16d362 /llvm/unittests/Support/MathExtrasTest.cpp | |
parent | 2d7bb6066722d894591360464608698e9125bdff (diff) | |
download | llvm-0ef7cbc319ee6488a47fda1b45b0d7170722df31.zip llvm-0ef7cbc319ee6488a47fda1b45b0d7170722df31.tar.gz llvm-0ef7cbc319ee6488a47fda1b45b0d7170722df31.tar.bz2 |
[InstCombine] reduce compare of signbits of 2 values, signed variant
(X s>> BitWidth - 1) == sext (Y s> -1) --> (X ^ Y) < 0
(X s>> BitWidth - 1) != sext (Y s> -1) --> (X ^ Y) > -1
This is the same logic as:
7cbfc39c77ca
...extended to deal with "signed" cast+shift instructions.
https://alive2.llvm.org/ce/z/LLidya
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
0 files changed, 0 insertions, 0 deletions