Commit c2eab59e authored by Nikita Popov's avatar Nikita Popov Committed by Tobias Hieta
Browse files

[GVN] Fix use-after-free in load PRE with select available value (#69314)

replaceValuesPerBlockEntry() only handled simple and coerced load
values, however the load may also be referenced by a select value.

Additionally, I suspect that the previous code might have been incorrect
if a load had an offset, as it always constructed the AvailableValue
from scratch.

Fixes https://github.com/llvm/llvm-project/issues/69301.

(cherry picked from commit 7f1733a2)
parent 58648146
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