[PATCH] D145223: [InstCombine] Combine binary operator of two phi node
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 01:46:10 PST 2023
StephenFan added a comment.
In D145223#4166576 <https://reviews.llvm.org/D145223#4166576>, @nikic wrote:
> In D145223#4166573 <https://reviews.llvm.org/D145223#4166573>, @xbolva00 wrote:
>
>> This optimization can be more general, why only add?
>
> Right. This can be generalized at least to `ConstantExpr::getBinOpIdentity()`, but more generally to performing a simplification on all operands -- the latter might be expensive in terms of compile-time though.
Okay, let me try to generalize to `ConstantExpr::getBinOpIdentity()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145223/new/
https://reviews.llvm.org/D145223
More information about the llvm-commits
mailing list