[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.
Loading
Please sign in to comment