diff options
| author | David Bolvansky <david.bolvansky@gmail.com> | 2019-06-21 16:25:32 +0000 | 
|---|---|---|
| committer | David Bolvansky <david.bolvansky@gmail.com> | 2019-06-21 16:25:32 +0000 | 
| commit | dbcdad51ff8263240ab236404a2c23bb2d6c3b2e (patch) | |
| tree | c38c3a78c852d1566a4deecb83a0354b1f1aa428 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | 96e77ce626a55dbf631a189a2e36e6d1404a9544 (diff) | |
| download | bcm5719-llvm-dbcdad51ff8263240ab236404a2c23bb2d6c3b2e.tar.gz bcm5719-llvm-dbcdad51ff8263240ab236404a2c23bb2d6c3b2e.zip | |
[InstCombine] (1 << (C - x)) -> ((1 << C) >> x) if C is bitwidth - 1
Summary:
```
%a = sub i32 31, %x
%r = shl i32 1, %a
  =>
%d = shl i32 1, 31
%r = lshr i32 %d, %x
Done: 1
Optimization is correct!
```
https://rise4fun.com/Alive/btZm
Reviewers: spatel, lebedev.ri, nikic
Reviewed By: lebedev.ri
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63652
llvm-svn: 364073
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
0 files changed, 0 insertions, 0 deletions

