HomePhabricator

[SDAG] expand ctpop != 1

Authored by spatel on Jun 25 2019, 7:46 AM.

Description

[SDAG] expand ctpop != 1

Change the generic ctpop expansion to more efficiently handle a
check for not-a-power-of-two value:
(ctpop x) != 1 --> (x == 0) || ((x & x-1) != 0)

This is the inverted predicate sibling pattern that was added with:
D63004

This should have been done before I changed IR canonicalization to
favor this form with:
rL364246
...so if this requires revert/changing, the earlier commit may also
need to modified.

llvm-svn: 364319

Details

Committed
spatelJun 25 2019, 7:46 AM
Parents
rGf0a665afca70: [AMDGPU] Null checking on TS to avoid crashing in clang tests.
Branches
Unknown
Tags
Unknown