diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2019-06-24 22:35:26 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2019-06-24 22:35:26 +0000 |
| commit | 2675b0c8abccc2f62796385f4d4090e4db0732a4 (patch) | |
| tree | 51c83ba471628a2da07a7b87ad6f924de5d0a07a /clang/lib/Serialization/ModuleManager.cpp | |
| parent | 8950d0a1f0620bb11f049dcdafb2b257c3c91d8f (diff) | |
| download | bcm5719-llvm-2675b0c8abccc2f62796385f4d4090e4db0732a4.tar.gz bcm5719-llvm-2675b0c8abccc2f62796385f4d4090e4db0732a4.zip | |
[InstCombine] squash is-not-power-of-2 using ctpop
This is the Demorgan'd 'not' of the pattern handled in:
D63660 / rL364153
This is another intermediate IR step towards solving PR42314:
https://bugs.llvm.org/show_bug.cgi?id=42314
We can test if a value is not a power-of-2 using ctpop(X) > 1,
so combining that with an is-zero check of the input is the
same as testing if not exactly 1 bit is set:
(X == 0) || (ctpop(X) u> 1) --> ctpop(X) != 1
llvm-svn: 364246
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
0 files changed, 0 insertions, 0 deletions

