Page MenuHomePhabricator

[X86] Attempt to more accurately model the cost of a bool reduction of wide vector type.

Authored by craig.topper on Wed, Mar 18, 6:20 PM.



Previously we multiplied the cost for the table entries by the number of splits needed. But that implies that each split goes through a reduction to scalar independently. I think what really happens is that the we AND/OR the split pieces until we're down to a single value with a legal type and then do special reduction sequence on that.

So to model that this patch takes the number of splits minus one multiplied by the cost of a AND/OR at the legal element count and adds that on top of the table lookup.

Diff Detail

Event Timeline

craig.topper created this revision.Wed, Mar 18, 6:20 PM
RKSimon accepted this revision.Thu, Mar 19, 5:53 AM



We might be able to drop this FIXME now.

This revision is now accepted and ready to land.Thu, Mar 19, 5:53 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptThu, Mar 19, 9:48 AM