This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by lebedev.ri on Apr 5 2018, 10:20 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel accepted this revision.Apr 5 2018, 1:37 PM

LGTM - but see inline comment for an improvement.

test/Transforms/InstCombine/select-of-bittest.ll
292

It's better for readability to give the params and other values names. You can use 'opt -instnamer' to do that.

This revision is now accepted and ready to land.Apr 5 2018, 1:37 PM
lebedev.ri added inline comments.Apr 5 2018, 1:57 PM
test/Transforms/InstCombine/select-of-bittest.ll
292

Hmm, right. I shall use that for the future tests, thanks!
But i guess i better keep this test as-is.

spatel added inline comments.Apr 5 2018, 2:00 PM
test/Transforms/InstCombine/select-of-bittest.ll
292

It's ok if you want to commit this as-is, but please do add the names and rebase D45108. No need to for pre-commit review for the test updating.

lebedev.ri added inline comments.Apr 5 2018, 2:04 PM
test/Transforms/InstCombine/select-of-bittest.ll
292

Is there some way to run the pass and not loose all the comments in the test?

spatel added inline comments.Apr 5 2018, 2:24 PM
test/Transforms/InstCombine/select-of-bittest.ll
292

Hmm...I don't know. I had never noticed that before. Maybe it's easier to just add the param names and find/replace the others by hand?

One thing you do have to be careful about - the CHECK generator script may have problems with values named '%tmp*' because as we can see it's using 'TMP*' for unnamed values.

This revision was automatically updated to reflect the committed changes.