This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] [NFC] Add tests for getting rid of select of bittest (PR36950 / PR17564)
ClosedPublic

Authored by lebedev.ri on Mar 30 2018, 2:22 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

lebedev.ri created this revision.Mar 30 2018, 2:22 PM

Deduplicate tests, improve test coverage.

Add tests with non-splat constant vectors.

spatel added inline comments.Apr 3 2018, 12:56 PM
test/Transforms/InstCombine/select-of-bittest.ll
447–450

This is testing that some other folds work as expected, so it doesn't really belong here IMO.

467

Similar to @n9, I'd remove this test because the pattern shouldn't survive as-is before we get to the select.

The comment isn't correct - shifting by the bit-width produces a poison value.

lebedev.ri updated this revision to Diff 140954.Apr 4 2018, 6:36 AM
lebedev.ri marked 2 inline comments as done.

Drop two unneeded negative tests.

spatel accepted this revision.Apr 4 2018, 6:45 AM

LGTM.

This revision is now accepted and ready to land.Apr 4 2018, 6:45 AM
This revision was automatically updated to reflect the committed changes.