[PATCH] D132783: [InstCombine] add support for multi-use Y of (X op Y) op Z --> (Y op Z) op X
Chenbing.Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 21:24:33 PDT 2022
Chenbing.Zheng closed this revision.
Chenbing.Zheng added a comment.
I commit this patch https://reviews.llvm.org/rG35a3048c2501, but forget associate this patch and I will close this.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1758
+ m_OneUse(m_Value(Z))))) {
// (X op Y) op Z --> (Y op Z) op X
+ if (!isa<Constant>(X) && !isa<Constant>(Y) && !isa<Constant>(Z)) {
----------------
spatel wrote:
> Move this comment line down, so it is above the corresponding code.
> Add another comment for:
> // (X op Y) opZ --> (X op Z) op Y
OK, I will modify it when I commit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132783/new/
https://reviews.llvm.org/D132783
More information about the llvm-commits
mailing list