where C1, C2 and C3 are integer constants, such that C2 = C3 << C1.
Some transformations in Instruction Combining may block GVN later.
For example,
(X + const1) << 22 || (X + const1) >> 10
may become
(X << 22 + const2) || (X + const1) >> 10
which will disable the GVN on x + const1.
This patch implements reverse transformation of such expressions thus, unfolding a common code to be eliminated by either GVN or CSE. In the default compilation pipeline GVN/CSE are run several times: after Instruction Combining, but before NaryReassociate and after NaryReassociate. Therefore, with this patch we try both patterns for GVN/CSE.
?