diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-02-19 22:14:21 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-02-19 22:14:21 +0000 |
commit | c1e018431795165dd3313cbc4e52e656909f678c (patch) | |
tree | 5d1c59372095430fe28bcf2adb08196aefe1b399 /lldb/packages/Python/lldbsuite/test/python_api/module_section | |
parent | bf223e9d59f47753e1d94e9c7e6dd4b497e3a1d7 (diff) | |
download | bcm5719-llvm-c1e018431795165dd3313cbc4e52e656909f678c.tar.gz bcm5719-llvm-c1e018431795165dd3313cbc4e52e656909f678c.zip |
[InstCombine] reduce even more unsigned saturated add with 'not' op
We want to use the sum in the icmp to allow matching with
m_UAddWithOverflow and eliminate the 'not'. This is discussed
in D51929 and is another step towards solving PR14613:
https://bugs.llvm.org/show_bug.cgi?id=14613
Name: uaddsat, -1 fval
%notx = xor i32 %x, -1
%a = add i32 %x, %y
%c = icmp ugt i32 %notx, %y
%r = select i1 %c, i32 %a, i32 -1
=>
%a = add i32 %x, %y
%c2 = icmp ugt i32 %y, %a
%r = select i1 %c2, i32 -1, i32 %a
Name: uaddsat, -1 fval + ult
%notx = xor i32 %x, -1
%a = add i32 %x, %y
%c = icmp ult i32 %y, %notx
%r = select i1 %c, i32 %a, i32 -1
=>
%a = add i32 %x, %y
%c2 = icmp ugt i32 %y, %a
%r = select i1 %c2, i32 -1, i32 %a
https://rise4fun.com/Alive/nTp
llvm-svn: 354393
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/module_section')
0 files changed, 0 insertions, 0 deletions