This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add tests for (or/and (icmp eq/ne A, C0), (icmp eq/ne A, C1)) where IsPow2(dif(C0, C1)); NFC
ClosedPublic

Authored by goldstein.w.n on Feb 17 2023, 10:31 AM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Feb 17 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 10:31 AM
Herald added a subscriber: pengfei. · View Herald Transcript
goldstein.w.n requested review of this revision.Feb 17 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 10:31 AM

Can we add tests on demand? It looks to me there are tests neither touched by D144283 nor D144284.

llvm/test/CodeGen/X86/icmp-pow2-dif.ll
4 ↗(On Diff #498438)

Use CHECK,SSE,SSE41 and CHECK,SSE,SSE2 for further fold?

goldstein.w.n marked an inline comment as done.Feb 19 2023, 10:49 PM

Can we add tests on demand? It looks to me there are tests neither touched by D144283 nor D144284.

There are some intentionally not touched tests *fail*. Would you prefer I drop some of them?

Fix misspell + better CHECK

Can we add tests on demand? It looks to me there are tests neither touched by D144283 nor D144284.

There are some intentionally not touched tests *fail*. Would you prefer I drop some of them?

Or otherwise adding comments to explain the intention.

Can we add tests on demand? It looks to me there are tests neither touched by D144283 nor D144284.

There are some intentionally not touched tests *fail*. Would you prefer I drop some of them?

Or otherwise adding comments to explain the intention.

Done.

Comment on intentional failures

Please can you rename to icmp-pow2-diff.ll ?

Please can you rename to icmp-pow2-diff.ll ?

Done.

RKSimon added inline comments.Feb 20 2023, 6:14 PM
llvm/test/CodeGen/X86/icmp-pow2-diff.ll
9

It should be possible to add nonuniform support in the future though? So is this a fail or a todo?

goldstein.w.n added inline comments.Feb 20 2023, 6:17 PM
llvm/test/CodeGen/X86/icmp-pow2-diff.ll
9

You're right, will change "fail" -> "todo" for cases we should be able to handle.

goldstein.w.n marked an inline comment as done.Feb 20 2023, 6:41 PM

Rename fails that should be handlable to todo

RKSimon accepted this revision.Feb 22 2023, 4:41 AM

LGTM

This revision is now accepted and ready to land.Feb 22 2023, 4:41 AM