This is an archive of the discontinued LLVM Phabricator instance.

[X86] Make foldLogicOfSetCCs work better for vectors pre legal types/operations
ClosedPublic

Authored by craig.topper on Jan 27 2018, 5:17 PM.

Details

Summary

There's a check in the code to only check getSetCCResultType after LegalOperations or if the type is MVT::i1. But the i1 check is only allowing scalar types through. I think it should check that the scalar type is MVT::i1 so that it will work for vectors.

The changed test already does this combine with AVX512VL where getSetCCResultType returns vXi1. But with avx512f and no VLX getSetCCResultType returns a type matching the width of the input type.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Jan 27 2018, 5:17 PM
spatel accepted this revision.Jan 28 2018, 10:23 AM

LGTM.

This revision is now accepted and ready to land.Jan 28 2018, 10:23 AM
This revision was automatically updated to reflect the committed changes.