This is an archive of the discontinued LLVM Phabricator instance.

[X86] Replace X86ISD::AVG with generic ISD::AVGCEILU
ClosedPublic

Authored by dmgreen on Feb 6 2022, 1:40 AM.

Details

Summary

Pulled out of D106237, this replaces the X86ISD::AVG DAG node with the generic ISD::AVGCEILU. It doesn't remove the detectAVGPattern method, but the extra generic ISel matching does allow some extra folding to happen in the tests.

Diff Detail

Event Timeline

dmgreen created this revision.Feb 6 2022, 1:40 AM
dmgreen requested review of this revision.Feb 6 2022, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2022, 1:40 AM
RKSimon accepted this revision.Feb 6 2022, 3:09 AM

LGTM

This revision is now accepted and ready to land.Feb 6 2022, 3:09 AM

@dmgreen Does this have to wait for D119072?

@dmgreen Does this have to wait for D119072?

Yeah I think that should be OK. I have it that way around at the moment, but can swap them easily enough I think. The tests might not be as good in the meantime is all :)

It will be a couple of days before I can get back to this though.

This revision was landed with ongoing or failed builds.Feb 11 2022, 10:57 AM
This revision was automatically updated to reflect the committed changes.