This is an archive of the discontinued LLVM Phabricator instance.

[x86] add special-case lowering for usubsat for AVX512
ClosedPublic

Authored by spatel on Oct 20 2021, 7:25 AM.

Details

Summary

This is a small extension of D112095 to avoid another regression seen with D112085.
In this case, we allow the same conversion from usubsat to ALU ops if the target supports vpternlog.

That pattern will get converted later in X86DAGToDAGISel::tryVPTERNLOG(). This seems better than putting a magic immediate constant directly in this code to create the exact vpternlog that we need. It's possible that there are other special-cases along these lines, so we should try to keep all of the vpternlog magic in one place.

Diff Detail

Event Timeline

spatel created this revision.Oct 20 2021, 7:25 AM
spatel requested review of this revision.Oct 20 2021, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2021, 7:25 AM
RKSimon accepted this revision.Oct 20 2021, 7:27 AM

LGTM - thanks for the cleanup!

This revision is now accepted and ready to land.Oct 20 2021, 7:27 AM
This revision was landed with ongoing or failed builds.Oct 20 2021, 1:41 PM
This revision was automatically updated to reflect the committed changes.