> How can we have a PLUS on a CONST_DOUBLE and a CONST_INT?  That does
> not make sense, as there is no MODE argument that could make this work
> correctly.  From your description, MODE must be some integer mode, in
> which case it is wrong to be using a CONST_DOUBLE in SFmode.
>
> (I don't know where the bug is; I'm just trying to help pin it down.)
Here it is!!
The problem is that for  the following insn(insn 20 19 21 2
 (set (reg:SI 141)
        (xor:SI (subreg:SI (reg:SF 139) 0)
            (reg:SI 140))) 65 {xorsi3} (expr_list:REG_EQUAL
(const_double:SF 0 [0x0] -0.0 [-0x0.0p+0])
        (nil)))

reg:SI 140 is known to have the constant value
(const_int -2147483648 [0x80000000]))
 and (subreg:SI (reg:SF 139) 0) is known to have the value
(const_double:SF 0 [0x0] 0.0 [0x0.0p+0])   [ as described by my
previous post in the same thread ]

Now, simplify_binary_operation_1 in simplify-rtx.c tries to

 /* Canonicalize XOR of the most significant bit to PLUS.  */
(simplify-rtx.c:2203)

and this results in a PLUS on  CONST_INT and CONST_DOUBLE.

maybe there should be a better check before canonicalizing here ?

Thanks,
Pranav

Reply via email to