Skip to content
Unverified Commit 5f57ad85 authored by Nikita Popov's avatar Nikita Popov Committed by GitHub
Browse files

[BasicAA] Remove incorrect rule about constant pointers (#76815)

BasicAA currently says that any Constant cannot alias an identified
local object. This is not correct if the local object escaped, as it's
possible to create a pointer to the escaped object using an inttoptr
constant expression base.

To compensate for this, make sure that inttoptr constant expressions are
treated as escape sources, just like inttoptr instructions. This ensures
that the optimization can still be applied if the local object is
non-escaping. This is sufficient to still optimize the original
motivating case from c53e2ecf.

Fixes https://github.com/llvm/llvm-project/issues/76789.
parent 55172b70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment