diff options
| author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-05-17 15:52:49 +0000 |
|---|---|---|
| committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-05-17 15:52:49 +0000 |
| commit | 3275060fe83841f7a4e22d3690738fe1677cf12e (patch) | |
| tree | 1bbbfce26625a01af2beac232ed69c4e407953b0 /llvm/lib/Support/InitLLVM.cpp | |
| parent | 83cc1b35d1871847bdb959d613abcb8bce15ffb2 (diff) | |
| download | bcm5719-llvm-3275060fe83841f7a4e22d3690738fe1677cf12e.tar.gz bcm5719-llvm-3275060fe83841f7a4e22d3690738fe1677cf12e.zip | |
[InstCombine] canShiftBinOpWithConstantRHS(): drop bogus signbit check
Summary:
In D61918 i was looking at dropping it in DAGCombiner `visitShiftByConstant()`,
but as @craig.topper pointed out, it was copied from here.
That check claims that the transform is illegal otherwise.
That isn't true:
1. For `ISD::ADD`, we only process `ISD::SHL` outer shift => sign bit does not matter
https://rise4fun.com/Alive/K4A
2. For `ISD::AND`, there is no restriction on constants:
https://rise4fun.com/Alive/Wy3
3. For `ISD::OR`, there is no restriction on constants:
https://rise4fun.com/Alive/GOH
3. For `ISD::XOR`, there is no restriction on constants:
https://rise4fun.com/Alive/ml6
So, why is it there then?
As far as i can tell, it dates all the way back to original check-in rL7793.
I think we should just drop it.
Reviewers: spatel, craig.topper, efriedma, majnemer
Reviewed By: spatel
Subscribers: llvm-commits, craig.topper
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61938
llvm-svn: 361043
Diffstat (limited to 'llvm/lib/Support/InitLLVM.cpp')
0 files changed, 0 insertions, 0 deletions

