This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Prevent the transform of the comparison for all undef elements
AbandonedPublic

Authored by Allen on May 19 2022, 6:26 AM.

Details

Summary

Some pass such as Loop Vectorization(-fvectorize) may generate undef elements
constant, which will ball out the combine optimization.
Note: Part undef elements don't prevent the transform of the comparison.

Diff Detail

Event Timeline

Allen created this revision.May 19 2022, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 6:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Allen requested review of this revision.May 19 2022, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 6:26 AM
paulwalker-arm added inline comments.May 20 2022, 8:52 AM
llvm/test/Transforms/InstCombine/icmp-bc-vec-inseltpoison.ll
129

Verify the case when all elements are undefined.

Not sure if I've missed some detail but when I run this test using an upstream pull from this morning I achieve the same output you're matching against here without needing this patch?

Allen added inline comments.May 20 2022, 7:35 PM
llvm/test/Transforms/InstCombine/icmp-bc-vec-inseltpoison.ll
129

Oh, sorry, my bad. I work with old commit dd644ddf8 before, and now the new upstream seem work fine, and don't need such work around

Allen abandoned this revision.May 20 2022, 7:35 PM