HomePhabricator

[RISCV] Add some 32-bit ctlz and cttz idiom tests to rv64zbb.ll. NFC

Authored by craig.topper on Mar 24 2021, 9:38 PM.

Description

[RISCV] Add some 32-bit ctlz and cttz idiom tests to rv64zbb.ll. NFC

This implements various idioms using ctlz/cttz like Log2, Log2_Ceil,
findFirstSetBit, etc.

Some of these demonstrate that we fail to use clzw because the
idiom breaks the isel patterns we use. The isel pattern we use
is (add (cttz (and X, 0xffffffff)), -32). Some of the idioms
cause the constant on the add to be different.

Details

Committed
craig.topperMar 24 2021, 9:52 PM
Parents
rG973ddb7d6e96: Define a `NoTerminator` traits that allows operations with a single block…
Branches
Unknown
Tags
Unknown