mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Mirror of https://github.com/RPCS3/llvm-mirror
fc0ecc3cd2
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 |
||
---|---|---|
benchmarks | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
configure | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
llvm.spec.in | ||
LLVMBuild.txt | ||
README.txt | ||
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.