Page MenuHomePhabricator

[X86] Don't form masked instructions if the operation has an additional user.

Authored by craig.topper on Apr 20 2019, 11:28 PM.



This will cause the operation to be repeated in both a mask and another masked
or unmasked form. This can a wasted of execution resources.

Unfortunately, a lot of our intrinsic test both masked and unmasked operations
with the same inputs and we now emit the op part only once. I'll try to clean
this up, but wanted to get feedback on the patch itself first.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 20 2019, 11:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2019, 11:28 PM
Herald added a subscriber: hiraditya. · View Herald Transcript

If we are happy with the assumption that a masked move is always as cheap or cheaper than any other masked op (we may want to explicitly state that at the vselect_mask def at the top of, I think this makes sense but I don't envy the job of fixing all these tests and adding more relevant ones.......

Rebase. I'm going to try to work on the tests or maybe just start blacklisting instructions until we get the tests fixed.

Black list instructions that are currently failing tests.

Rebase now that I fixed most of the tests to avoid the blacklist

Add one use check for scalars as well

RKSimon accepted this revision.Fri, Mar 27, 5:40 AM

LGTM with a few typo corrections







This revision is now accepted and ready to land.Fri, Mar 27, 5:40 AM
This revision was automatically updated to reflect the committed changes.