This is the mail archive of the gcc-bugs@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]

[Bug target/36090] [4.3/4.4 Regression] ppc64 cacoshl miscompilation



------- Comment #15 from dje at gcc dot gnu dot org  2008-05-02 15:43 -------
This patch groups RTX_CONST_OBJ before CONST_INT.

Index: simplify-rtx.c
===================================================================
*** simplify-rtx.c      (revision 134851)
--- simplify-rtx.c      (working copy)
*************** simplify_plus_minus (enum rtx_code code,
*** 3676,3682 ****

    if (n_ops > 1
        && GET_CODE (ops[n_ops - 1].op) == CONST_INT
!       && CONSTANT_P (ops[n_ops - 2].op))
      {
        rtx value = ops[n_ops - 1].op;
        if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
--- 3676,3684 ----

    if (n_ops > 1
        && GET_CODE (ops[n_ops - 1].op) == CONST_INT
!       && CONSTANT_P (ops[n_ops - 2].op)
!       && (n_ops < 3
!         || !CONSTANT_P (ops[n_ops - 3].op)))
      {
        rtx value = ops[n_ops - 1].op;
        if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36090


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