[PATCH] D116058: [InstCombine] Convert binop(phi, v) to phi(binop) for constant phi operands
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 00:19:27 PST 2022
nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.
I think it's pretty clear that `op(phi(c1, c2))` to `phi(op(c1), op(c2))` is not the correct canonicalization for the middle-end optimizer, because it increases redundancy. Materialization of phi operands is firmly a backend matter, and this transform should live somewhere in the backend IR pipeline. I do agree that the general idea makes sense if done right (i.e. not overly aggressive, as SpeculateAroundPhis was).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116058/new/
https://reviews.llvm.org/D116058
More information about the llvm-commits
mailing list