This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Add support for <64 x i1> bool reduction
ClosedPublic

Authored by RKSimon on Sep 2 2019, 4:36 AM.

Details

Summary

This generalizes the existing <32 x i1> pre-AVX2 split code to support reductions from <64 x i1> as well, we can probably generalize to any larger pow2 case in the future if the (unlikely) need ever arises.

We still need to tweak combineBitcastvxi1 to improve AVX512F codegen as its assumes vXi1 types should be handled on the mask registers even when they aren't legal.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Sep 2 2019, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2019, 4:36 AM
craig.topper added inline comments.Sep 5 2019, 2:54 PM
test/CodeGen/X86/vector-reduce-and-bool.ll
842 ↗(On Diff #218329)

Can we do something to fix this case?

RKSimon added inline comments.Sep 6 2019, 1:48 AM
test/CodeGen/X86/vector-reduce-and-bool.ll
842 ↗(On Diff #218329)

Yup, combineBitcastvxi1 needs some tweaking to better handle this. I'm happy to do this before or after this patch but they are separate improvements.

This revision is now accepted and ready to land.Sep 7 2019, 6:30 PM
This revision was automatically updated to reflect the committed changes.