This is an archive of the discontinued LLVM Phabricator instance.

[ScalarEvolution] Add an additional bailout to avoid NOT of pointer.
AbandonedPublic

Authored by efriedma on Sep 8 2021, 5:53 PM.

Details

Summary

It's possible in some cases for the LHS to be a pointer where the RHS is not. This isn't directly possible for an icmp, but the analysis mixes up operands of different icmp expressions in some cases.

I haven't managed to reduce a testcase I can commit; the testcase in the bug depends on sanitizer passes, and the obvious reduction methods didn't work for me.

Also add an assertion to getNotSCEV() to make tracking down this sort of issue a bit easier in the future.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51787 .

Diff Detail