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] |
In message <10106280120.AA27941@vlsi1.ultra.nyu.edu>you write: > + /* Put complex operands first and constants second if commutative. > */ > + if (GET_RTX_CLASS (code) == 'c' > + && ((CONSTANT_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) != CONST_INT) > + || (GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == 'o' > + && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o') > + || (GET_CODE (XEXP (x, 0)) == SUBREG > + && GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0)))) == 'o' > + && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o'))) > + { > > This should call swap_commutative_operands_p (in rtlanal.c). OK. Bootstrapped ia32-linux. * simplify-rtx.c (simplify_rtx): Use swap_commutative_operands_p. Index: simplify-rtx.c =================================================================== RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v retrieving revision 1.63 diff -c -3 -p -r1.63 simplify-rtx.c *** simplify-rtx.c 2001/06/29 21:15:01 1.63 --- simplify-rtx.c 2001/06/29 22:59:23 *************** simplify_rtx (x) *** 2526,2539 **** return simplify_unary_operation (code, mode, XEXP (x, 0), GET_MODE (XEXP (x, 0))); case 'c': ! /* Put complex operands first and constants second if commutative. */ ! if (GET_RTX_CLASS (code) == 'c' ! && ((CONSTANT_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) != CONST_INT) ! || (GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == 'o' ! && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o') ! || (GET_CODE (XEXP (x, 0)) == SUBREG ! && GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0)))) == 'o' ! && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o'))) { rtx tem; --- 2526,2532 ---- return simplify_unary_operation (code, mode, XEXP (x, 0), GET_MODE (XEXP (x, 0))); case 'c': ! if (swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1))) { rtx tem;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |