diff options
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index fc94c68..754cd34 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -11990,6 +11990,13 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) } } + /* We may have changed the comparison operands. Re-canonicalize. */ + if (swap_commutative_operands_p (op0, op1)) + { + tem = op0, op0 = op1, op1 = tem; + code = swap_condition (code); + } + /* If this machine only supports a subset of valid comparisons, see if we can convert an unsupported one into a supported one. */ target_canonicalize_comparison (&code, &op0, &op1, 0); |