+ int l_idx = get_irn_idx(l);
+ int r_idx = get_irn_idx(r);
+
+ /* For commutative operators perform a OP b == b OP a but keep
+ constants on the RIGHT side. This helps greatly in some optimizations.
+ Moreover we use the idx number to make the form deterministic. */
+ if (is_irn_constlike(l))
+ l_idx = -l_idx;
+ if (is_irn_constlike(r))
+ r_idx = -r_idx;
+ if (l_idx < r_idx) {