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
AbandonedPublic

Authored by craig.topper on Dec 11 2018, 6:00 PM.

Details

Summary

This is split from D55452

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

Event Timeline

craig.topper created this revision.Dec 11 2018, 6:00 PM
ABataev added inline comments.Dec 12 2018, 6:43 AM
include/llvm/CodeGen/BasicTTIImpl.h
1434

Is this really required for this patch? I think not. This patch should do only the declared thing - fix of the cost, nothing else. This change is not required for the fix of the cost model.

craig.topper abandoned this revision.Dec 12 2018, 1:29 PM

I think I must have grabbed the wrong diff file. I'll fine the right find and start a new review.