Skip to content
Commit 35a3048c authored by Chenbing Zheng's avatar Chenbing Zheng
Browse files

[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.
parent c059ede2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment