[PATCH] D97665: [InstSimplify] Don't fold comparisons of non-inbounds GEPs
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 01:47:45 PST 2021
lebedev.ri added a comment.
In D97665#2602726 <https://reviews.llvm.org/D97665#2602726>, @LemonBoy wrote:
>> But, I'm rather curious about how the miscompilation happened from this optimization. A gep with such offset isn't common, unless a programmer writes a code that subtracts a pointer from null (which is already fishy)?
>> It would be great if I can see the input that causes miscompilation.
>
> As stated here <https://github.com/AliveToolkit/alive2/issues/684#issuecomment-788122580> the gep is being generated by the SCEV pass.
> A minimal test case that shows the gep being created (but not this miscompilation) is here <https://gist.github.com/LemonBoy/203846aac164a7e4dba92d9081898887>.
(i've already been looking at the scev problem, maybe will post patch soon-ish)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97665/new/
https://reviews.llvm.org/D97665
More information about the llvm-commits
mailing list