diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-09-30 17:02:26 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-09-30 17:02:26 +0000 |
commit | 712b7c24634f5c471be4752111836900d65a7a3a (patch) | |
tree | 4c911bbc0a839fae3f69b5fd0bd0139dcf11f856 /lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp | |
parent | 926f55706605f8e1b8a8598448058e6a1875d92c (diff) | |
download | bcm5719-llvm-712b7c24634f5c471be4752111836900d65a7a3a.tar.gz bcm5719-llvm-712b7c24634f5c471be4752111836900d65a7a3a.zip |
[InstCombine] fold negate disguised as select+mul
Name: negate if true
%sel = select i1 %cond, i32 -1, i32 1
%r = mul i32 %sel, %x
=>
%m = sub i32 0, %x
%r = select i1 %cond, i32 %m, i32 %x
Name: negate if false
%sel = select i1 %cond, i32 1, i32 -1
%r = mul i32 %sel, %x
=>
%m = sub i32 0, %x
%r = select i1 %cond, i32 %x, i32 %m
https://rise4fun.com/Alive/Nlh
llvm-svn: 373230
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp')
0 files changed, 0 insertions, 0 deletions