Unverified Commit d8cd7fc1 authored by alex-t's avatar alex-t Committed by GitHub
Browse files

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 4bf015c0 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 z...
parent 5416309d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment