]> granicus.if.org Git - llvm/commit
[ImplicitNullCheck] Fix the bug when dependent instruction accesses memory
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 9 Aug 2017 05:17:02 +0000 (05:17 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Wed, 9 Aug 2017 05:17:02 +0000 (05:17 +0000)
commit0c0ee9fbcadabf58c682b500199299aa7f245bba
tree7f5efca6e2c6a1fabc2efb70b87d066d1ea0040e
parent00a76938ff272478e851ee9049ea2f715e014b64
[ImplicitNullCheck] Fix the bug when dependent instruction accesses memory

It is possible that dependent instruction may access memory.
In this case we must reject optimization because the memory change will
be visible in null handler basic block. So we will execute an instruction which
we must not execute if check fails.

Reviewers: sanjoy, reames
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36392

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310443 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ImplicitNullChecks.cpp
test/CodeGen/X86/implicit-null-checks.mir