1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Go to file
Florian Hahn fc0ecc3cd2 [SCCP] Do not replace deref'able ptr with un-deref'able one.
Currently IPSCCP (and others like CVP/GVN) blindly propagate pointer
equalities. In certain cases, that leads to dereferenceable pointers
being replaced, as in the example test case.

I think this is not allowed, as it introduces an access of an
un-dereferenceable pointer. Note that the pointer is inbounds, but one
past the last element, so it is valid, but not dereferenceable.

This patch is mostly to highlight the issue and start a discussion.
Currently it only checks for specifically looking
one-past-the-last-element pointers with array typed bases.

This causes the mis-compile outlined in
https://stackoverflow.com/questions/55754313/is-this-gcc-clang-past-one-pointer-comparison-behavior-conforming-or-non-standar

In the test case, if we replace %p with the GEP for the store, we
subsequently determine that the store and the load cannot alias, because
they are to different underlying objects.

Note that Alive2 seems to think that the replacement is valid:
https://alive2.llvm.org/ce/z/2rorhk

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85332
2020-09-03 10:22:21 +01:00
benchmarks
bindings [OCaml] Remove add_constant_propagation 2020-08-27 09:30:21 -07:00
cmake [CMake] Use find_library for ncurses 2020-08-31 20:06:21 -07:00
docs [LangRef] Fix condition for when a loop is considered parallel. 2020-09-01 15:41:59 -05:00
examples [examples] Fix dependencies for OrcV2Examples/LLJITWithThinLTOSummaries. 2020-08-25 11:51:20 -07:00
include [AArch64] Add asm directives for the remaining SEH unwind codes 2020-09-03 11:12:01 +03:00
lib [SCCP] Do not replace deref'able ptr with un-deref'able one. 2020-09-03 10:22:21 +01:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes [runtimes] Remove TOOLCHAIN_TOOLS specialization 2020-08-24 13:48:29 -07:00
test [SCCP] Do not replace deref'able ptr with un-deref'able one. 2020-09-03 10:22:21 +01:00
tools [llvm-readelf/obj] - Cleanup the interface of DumpStyle. NFCI. 2020-09-03 12:17:46 +03:00
unittests [RFC][Target] Add a new triple called Triple::csky 2020-09-02 12:46:09 +08:00
utils Revert "[NewPM][Lint] Port -lint to NewPM" 2020-09-02 21:34:29 -07:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' 2020-07-07 14:53:45 +02:00
CMakeLists.txt [CMake] Remove -Wl,-allow-shlib-undefined which was added in rL221530 2020-09-01 21:13:45 -07:00
CODE_OWNERS.TXT Update my email address. 2020-08-21 10:15:26 -07:00
configure
CREDITS.TXT Update my email address. 2020-08-21 10:15:26 -07:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.