Hello! Attached patch fixes
FAIL: c-c++-common/cilk-plus/AN/builtin_fn_mutating.c -O3 cilkplus failure on alpha [1]. The problem was triggered only with -O3, due to direct expansion of conditional move. The attached patch swaps all compares, modulo DImode compares with zero, in the same way as expansions of conditional branch and setcc patterns. 2013-06-01 Uros Bizjak <ubiz...@gmail.com> * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all GE, GT, GEU and GTU compares, modulo DImode compares with zero. OK for mainline and release branches? [1] http://gcc.gnu.org/ml/gcc-testresults/2013-05/msg02980.html Uros.
Index: alpha.c =================================================================== --- alpha.c (revision 199439) +++ alpha.c (working copy) @@ -2700,12 +2700,12 @@ alpha_emit_conditional_move (rtx cmp, enum machine break; case GE: case GT: case GEU: case GTU: - /* These must be swapped. */ - if (op1 != CONST0_RTX (cmp_mode)) - { - code = swap_condition (code); - tem = op0, op0 = op1, op1 = tem; - } + /* These normally need swapping, but for integer zero we have + special patterns that recognize swapped operands. */ + if (cmp_mode == DImode && op1 == const0_rtx) + break; + code = swap_condition (code); + tem = op0, op0 = op1, op1 = tem; break; default: