[llvm] [GVN][NewGVN][Local] Handle attributes for function calls after CSE (PR #114011)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 02:35:23 PDT 2024
dtcxzyw wrote:
> You can't really restrict replacements after the fact in GVN, you need to do so during value numbering.
I've considered this approach before. But it is too heavy to add `Attributes` to `GVNPass::Expression`.
> Note that the adds will get CSEd, because the canBeReplacedBy check is specifically on the calls, not on any later instructions that are numbered based on the incorrect assumption that the calls are equivalent.
You are right. I missed this case.
https://github.com/llvm/llvm-project/pull/114011
More information about the llvm-commits
mailing list