1 /* { dg-do compile { target { ! { ia32 } } } } */
2 /* { dg-options "-O2 -mx32 -maddress-mode=long" } */
4 typedef struct rtx_def
*rtx
;
5 enum rtx_code
{ MINUS
};
9 typedef union rtunion_def rtunion
;
11 enum rtx_code code
: 16;
17 rtx
simplify_binary_operation (enum rtx_code code
, int mode
,
19 struct simplify_plus_minus_op_data
{
23 void simplify_plus_minus (enum rtx_code code
, int mode
, rtx op0
, rtx op1
)
25 struct simplify_plus_minus_op_data ops
[8];
27 int n_ops
= 2, input_ops
= 2;
28 int changed
, canonicalized
= 0;
30 __builtin_memset (ops
, 0, sizeof (ops
));
34 for (i
= 0; i
< n_ops
; i
++)
36 rtx this_op
= ops
[i
].op
;
37 int this_neg
= ops
[i
].neg
;
38 enum rtx_code this_code
= ((enum rtx_code
) (this_op
)->code
);
47 canonicalized
|= this_neg
;
56 for (i
= n_ops
- 1; j
>= 0; j
--)
58 rtx lhs
= ops
[j
].op
, rhs
= ops
[i
].op
;
59 int lneg
= ops
[j
].neg
, rneg
= ops
[i
].neg
;
60 if (lhs
!= 0 && rhs
!= 0)
62 enum rtx_code ncode
= MINUS
;
63 if (((enum rtx_code
) (lhs
)->code
) == MINUS
)
64 tem
= simplify_binary_operation (ncode
, mode
, lhs
, rhs
);
65 if (tem
&& ! (((enum rtx_code
) (tem
)->code
) == MINUS
66 && ((((((tem
)->u
.fld
[0]).rt_rtx
))->u
.fld
[0]).rt_rtx
) == lhs
67 && ((((((tem
)->u
.fld
[0]).rt_rtx
))->u
.fld
[1]).rt_rtx
) == rhs
))
78 for (i
= 0, j
= 0; j
< n_ops
; j
++)