[PATCH] D145223: [InstCombine] Combine binary operator of two phi node

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 01:36:24 PST 2023


nikic added a comment.

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.


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