This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix rtl-opt/21163


The specific problem here is that (xor:V2SI (reg:V2SI 101) (reg:V2SI 101))
got simplified to the scalar (const_int 0) instead of a vector zero.

While looking at the code here, I noticed quite a few other places in the
same function that ought to be using CONST{0,1}_RTX instead of the scalar
integer names directly.

On mainline, appearantly someone fixed the specific XOR case, but hadn't
changed any of the other similar bugs that I found.

Tested on i686-linux.  Applied 4.0 and mainline.


r~


        * simplify-rtx.c (simplify_binary_operation) <IOR>: Check
        for SCALAR_INT_MODE_P instead of not MODE_CC before returning
        constm1_rtx.
        <XOR, AND, LSHIFTRT, UMIN>: Use CONST0_RTX.
        <UDIV, UMOD>: Use CONST0_RTX and CONST1_RTX.
        <DIV, MOD>: Likewise.

Attachment: z-40
Description: Text document

Attachment: z-41
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]