HomePhabricator

[InstCombine] move tests for select with bit-test of condition; NFC

Description

[InstCombine] move tests for select with bit-test of condition; NFC

These are all but 1 of the select-of-constant tests that appear
to be transformed within foldSelectICmpAnd() and the block above
it predicated by decomposeBitTestICmp().

As discussed in D45862 (and can be seen in several tests here),
we probably want to stop doing those transforms because they
can increase the instruction count without benefitting other
passes or codegen.

The 1 test not included here is a urem test where the bit hackery
allows us to remove a urem. To preserve killing that urem, we
should do some stronger known-bits analysis or pattern matching of
'urem x, (select-of-pow2-constants)'.

Details

Committed
spatelApr 24 2018, 2:06 PM
Parents
rL330767: AMDGPU/GlobalISel: Add support for amdgpu_ps calling convention
Branches
Unknown
Tags
Unknown