PR middle-end/82062
commit523e270000912c0b06a096e2ab67abfb2e044ef1
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Oct 2017 21:53:21 +0000 (25 21:53 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Oct 2017 21:53:21 +0000 (25 21:53 +0000)
treed798c4a380498017a30d56af6f0e4f30dd6187b1
parentdc684a8cd2e5418f77e6290d6c83849def80e938
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254089 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-cond-2.c [moved from gcc/testsuite/gcc.dg/fold-cond_expr-1.c with 100% similarity]
gcc/testsuite/gcc.dg/fold-cond-3.c [new file with mode: 0644]