This is an archive of the discontinued LLVM Phabricator instance.

[CostModel][X86] Don't count 2 shuffles on the last level of a pairwise arithmetic or min/max reduction
ClosedPublic

Authored by craig.topper on Dec 12 2018, 1:38 PM.

Details

Summary

This is split from D55452 with the correct patch this time.

Pairwise reductions require two shuffles on every level but the last. On the last level the two shuffles are <1, u, u, u...> and <0, u, u, u...>, but <0, u, u, u...> will be dropped by InstCombine/DAGCombine as being an identity shuffle.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Dec 12 2018, 1:38 PM
This revision is now accepted and ready to land.Dec 13 2018, 6:33 AM
This revision was automatically updated to reflect the committed changes.