This is an archive of the discontinued LLVM Phabricator instance.

[LV] Keep Primary Induction alive when folding tail by masking
ClosedPublic

Authored by Ayal on Nov 24 2020, 2:52 AM.

Details

Summary

The primary induction should be considered alive when folding tail by masking, because it will be used by said masking; even when it may otherwise appear useless: feeding only its own 'bump', which is correctly considered dead, and as the 'bump' of another induction variable, which may wrongfully want to consider its bump = the primary induction, dead.

Fixes PR47390.

Diff Detail

Event Timeline

Ayal created this revision.Nov 24 2020, 2:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2020, 2:52 AM
Ayal requested review of this revision.Nov 24 2020, 2:52 AM
dmgreen accepted this revision.Nov 24 2020, 4:49 AM

Seems good to me. Thanks

llvm/test/Transforms/LoopVectorize/dead_instructions.ll
49

if -> is

This revision is now accepted and ready to land.Nov 24 2020, 4:49 AM
fhahn accepted this revision.Nov 24 2020, 5:08 AM

LGTM, thanks!