This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] replace undef elements in vector constant when doing icmp folds (PR44383)
ClosedPublic

Authored by spatel on Jan 2 2020, 12:55 PM.

Details

Summary

As shown in P44383:
https://bugs.llvm.org/show_bug.cgi?id=44383
...we can't safely propagate a vector constant through this icmp fold if that vector constant contains undefined elements.

We know that each defined element of the constant is safe though, so find the first of those and replicate it into the formerly undef lanes.

Diff Detail

Event Timeline

spatel created this revision.Jan 2 2020, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 2 2020, 12:56 PM
nlopes accepted this revision.Jan 2 2020, 1:54 PM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 2 2020, 1:54 PM
This revision was automatically updated to reflect the committed changes.