[all-commits] [llvm/llvm-project] 35a304: [InstCombine] add support for multi-use Y of (X op...
ZCBing via All-commits
all-commits at lists.llvm.org
Tue Aug 30 19:55:40 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 35a3048c2501f7e1de4f662ed402a37f4822feec
https://github.com/llvm/llvm-project/commit/35a3048c2501f7e1de4f662ed402a37f4822feec
Author: Chenbing Zheng <Chenbing.Zheng at streamcomputing.com>
Date: 2022-08-31 (Wed, 31 Aug 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/and-or-not.ll
Log Message:
-----------
[InstCombine] add support for multi-use Y of (X op Y) op Z --> (Y op Z) op X
For (X op Y) op Z --> (Y op Z) op X
we can still do transform when Y is multi-use. In D131356 limit it to one-use,
this patch remove this limit.
This is still not a complete solution, I add a todo test to show it.
In this case, X and Y are both multi use, we can't differentiate how to convert based on this.
But at least we don't make the code worse,and it can solve half the scenarios.
More information about the All-commits
mailing list