summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/FileDistance.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-07-04 08:01:26 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-07-04 08:01:26 +0000
commite8e01143ec642be7a1f7e8936254071a86cd9630 (patch)
treef79a42eae72029cd66741aaad9836e9a0d5f3ba0 /clang-tools-extra/clangd/FileDistance.cpp
parent600adef31bdb2dcc20f89a1633a55d27966e9de6 (diff)
downloadbcm5719-llvm-e8e01143ec642be7a1f7e8936254071a86cd9630.tar.gz
bcm5719-llvm-e8e01143ec642be7a1f7e8936254071a86cd9630.zip
[ImplicitNullChecks] Check for rewrite of register used in 'test' instruction
The following code pattern: mov %rax, %rcx test %rax, %rax %rax = .... je throw_npe mov(%rcx), %r9 mov(%rax), %r10 gets transformed into the following incorrect code after implicit null check pass: mov %rax, %rcx %rax = .... faulting_load_op("movl (%rax), %r10", throw_npe) mov(%rcx), %r9 For implicit null check pass, if the register that is checked for null value (ie, the register used in the 'test' instruction) is written into before the condition jump, we should avoid doing the optimization. Patch by Surya Kumari Jangala! Differential Revision: https://reviews.llvm.org/D48627 Reviewed By: skatkov llvm-svn: 336241
Diffstat (limited to 'clang-tools-extra/clangd/FileDistance.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud