aboutsummaryrefslogtreecommitdiff
path: root/clang/test/ParserOpenACC/parse-wait-construct.c
diff options
context:
space:
mode:
authoralex-t <alex-t@users.noreply.github.com>2023-12-07 17:35:35 +0100
committerGitHub <noreply@github.com>2023-12-07 17:35:35 +0100
commitd8cd7fc1f404161f9ec378a1cf3c52f8b8e9beca (patch)
tree6bba73828fba43ee196a3cf96beec8c3086b556b /clang/test/ParserOpenACC/parse-wait-construct.c
parent5416309da4e8cc44ca8f522232873587726d89c5 (diff)
downloadllvm-d8cd7fc1f404161f9ec378a1cf3c52f8b8e9beca.zip
llvm-d8cd7fc1f404161f9ec378a1cf3c52f8b8e9beca.tar.gz
llvm-d8cd7fc1f404161f9ec378a1cf3c52f8b8e9beca.tar.bz2
AlignmentFromAssumptions should only track pointer operand users (#73370)
AlignmentFromAssumptions uses SCEV to update the load/store alignment. It tracks down the use-def chains for the pointer which it takes from the assumption cache until it reaches the load or store instruction. It mistakenly adds to the worklist the users of the load result irrespective of the fact that the load result has no connection with the original pointer, moreover, it is not a pointer at all in most cases. Thus the def-use chain contains irrelevant load users. When it is a store instruction the algorithm attempts to adjust its alignment to the alignment of the original pointer. The problem appears when the load and store memory operand pointers belong to different address spaces and possibly have different sizes. The 4bf015c035e4e5b63c7222dfb15ff274a5ed905c was an attempt to address a similar problem. The truncation or zero extension was added to make pointers the same size. That looks strange to me because the zero extension of the pointer is not legal. The test in the 4bf015c035e4e5b63c7222dfb15ff274a5ed905c does not work any longer as for the explicit address spaces conversion the addrspacecast is generated. Summarize: 1. For the alloca to global address spaces conversion addrspacecasts are used, so the code added by the 4bf015c035e4e5b63c7222dfb15ff274a5ed905c is no longer functional. 2. The AlignmentFromAssumptions algorithm should not add the load users to the worklist as they have nothing to do with the original pointer. 3. Instead we only track users that are: GetelementPtrIns, PHINodes.
Diffstat (limited to 'clang/test/ParserOpenACC/parse-wait-construct.c')
0 files changed, 0 insertions, 0 deletions