]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/106070 - bogus cond-expr folding
authorRichard Biener <rguenther@suse.de>
Fri, 24 Jun 2022 11:37:22 +0000 (13:37 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 24 Jun 2022 12:50:05 +0000 (14:50 +0200)
commitb36a1c964f99758de1f3b169628965d3c3af812b
tree16002b04d83ab2c47affc181a23be9cd5dfd4769
parentfa4e97907fc979f550c3f02cde03d9c35f99df9b
middle-end/106070 - bogus cond-expr folding

The following fixes up r13-469-g9a53101caadae1b5 by properly
implementing what operand_equal_for_comparison_p did.

2022-06-24  Richard Biener  <rguenther@suse.de>

PR middle-end/106070
* match.pd (a != b ? a : b): Fix translation of
operand_equal_for_comparison_p.

* gcc.dg/torture/pr106070.c: New testcase.
gcc/match.pd
gcc/testsuite/gcc.dg/torture/pr106070.c [new file with mode: 0644]