[PATCH] D100884: Generalize getInvertibleOperand to support mismatched phi operand order
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 13:12:03 PDT 2021
reames created this revision.
reames added a reviewer: nikic.
Herald added subscribers: hiraditya, mcrosier.
Herald added a reviewer: bollu.
reames requested review of this revision.
Herald added a project: LLVM.
Follow up to D99912 <https://reviews.llvm.org/D99912>, specifically the revert, fix, and reapply thereof.
By allowing mismatching operand numbers of the phi, we can recurse through a pair of phi recurrences whose operand orders have not been canonicalized.
After writing this, I started questioning the value of it. This is a non-canonical form, and other optimization passes will canonicalize towards equal order. Is the extra power really worth it? I can see arguments on both sides, so curious what reviewers think.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100884
Files:
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Analysis/ValueTracking/known-non-equal.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100884.338972.patch
Type: text/x-patch
Size: 5491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/3e1677e3/attachment.bin>
More information about the llvm-commits
mailing list