+2015-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65014
+ * fold-const.c (fold_binary_loc): When creating {L,R}ROTATE_EXPR,
+ use original second operand of arg0 or arg1 instead of
+ that adjusted by STRIP_NOPS.
+
2015-02-11 Jeff Law <law@redhat.com>
PR target/63347
tem = build2_loc (loc, LROTATE_EXPR,
TREE_TYPE (TREE_OPERAND (arg0, 0)),
TREE_OPERAND (arg0, 0),
- code0 == LSHIFT_EXPR ? tree01 : tree11);
+ code0 == LSHIFT_EXPR
+ ? TREE_OPERAND (arg0, 1)
+ : TREE_OPERAND (arg1, 1));
return fold_convert_loc (loc, type, tem);
}
else if (code11 == MINUS_EXPR)
? LROTATE_EXPR
: RROTATE_EXPR),
TREE_TYPE (TREE_OPERAND (arg0, 0)),
- TREE_OPERAND (arg0, 0), tree01));
+ TREE_OPERAND (arg0, 0),
+ TREE_OPERAND (arg0, 1)));
}
else if (code01 == MINUS_EXPR)
{
? LROTATE_EXPR
: RROTATE_EXPR),
TREE_TYPE (TREE_OPERAND (arg0, 0)),
- TREE_OPERAND (arg0, 0), tree11));
+ TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 1)));
}
}
}
+2015-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65014
+ * gcc.c-torture/compile/pr65014.c: New test.
+
2015-02-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/57822