https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78510
--- Comment #4 from amker at gcc dot gnu.org --- Author: amker Date: Fri Nov 25 11:45:43 2016 New Revision: 242874 URL: https://gcc.gnu.org/viewcvs?rev=242874&root=gcc&view=rev Log: PR middle-end/78507 PR middle-end/78510 PR middle-end/78517 * match.pd ((cond (cmp (convert1? @1) @3) (convert2? @1) @2)): Use cmp directly, rather than cmp_code. Initialize code to ERROR_MARK and set it to result code if transformation is valid. Use code EQ directly in last simplification case. gcc/testsuite PR middle-end/78507 PR middle-end/78510 PR middle-end/78517 * g++.dg/torture/pr78507.C: New test. * gcc.dg/torture/pr78510.c: New test. * gcc.dg/torture/pr78517.c: New test. Added: trunk/gcc/testsuite/g++.dg/torture/pr78507.C trunk/gcc/testsuite/gcc.dg/torture/pr78510.c trunk/gcc/testsuite/gcc.dg/torture/pr78517.c Modified: trunk/gcc/ChangeLog trunk/gcc/match.pd trunk/gcc/testsuite/ChangeLog