re PR middle-end/82062 (simple conditional expressions no longer folded)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 25 Oct 2017 21:53:21 +0000 (21:53 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 25 Oct 2017 21:53:21 +0000 (21:53 +0000)
commitc0b24017eb8fee727bf1244e269e4b6b435e7952
treed798c4a380498017a30d56af6f0e4f30dd6187b1
parenta2af967e9718d3d15461dbc5c52008ceab63a2f0
re PR middle-end/82062 (simple conditional expressions no longer folded)

PR middle-end/82062
* fold-const.c (operand_equal_for_comparison_p): Also return true
if ARG0 is a simple variant of ARG1 with narrower precision.
(fold_ternary_loc): Always pass unstripped operands to the predicate.

From-SVN: r254089
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-cond-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-cond-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-cond_expr-1.c [deleted file]