[PATCH][RFC] bitwise CCP, 2nd try
Paolo Bonzini
bonzini@gnu.org
Thu Aug 5 03:04:00 GMT 2010
On 08/04/2010 04:14 PM, Richard Guenther wrote:
> On Wed, 4 Aug 2010, Paolo Bonzini wrote:
>
>> On 08/04/2010 02:53 PM, Richard Guenther wrote:
>>> gcc_assert (old_val->lattice_val< new_val.lattice_val
>>> || (old_val->lattice_val == new_val.lattice_val
>>> && ((!old_val->value&& !new_val.value)
>>> + /* Allow transitioning from&x to&x& ~3. */
>>> + || (TREE_CODE (old_val->value) != INTEGER_CST
>>> + && TREE_CODE (new_val.value) == INTEGER_CST)
>>> + || (TREE_CODE (old_val->value) == INTEGER_CST
>>> + && TREE_CODE (new_val.value) == INTEGER_CST
>>> + && double_int_equal_p
>>> + (double_int_and_not
>>> + (tree_to_double_int (old_val->value),
>>> + new_val.mask),
>>> + double_int_and_not
>>> + (tree_to_double_int (new_val.value),
>>> + new_val.mask)))
>>> || operand_equal_p (old_val->value, new_val.value,
>>> 0))));
>>
>> Also, do you have a testcase for the CONSTANT/CONSTANT check?
>
> The &x -> &x & ~3 transition? It happens during bootstrap - I yet
> have to create a set of (exhaustive) testcases.
That, and
+ /* We have to be careful to not go up the bitwise lattice
+ represented by the mask.
+ ??? This doesn't seem to be the best place to enforce this. */
if they aren't the same thing.
Paolo
More information about the Gcc-patches
mailing list