From: Uros Bizjak Date: Tue, 3 Dec 2019 08:23:06 +0000 (+0100) Subject: re PR target/92744 (error: insn does not satisfy its constraints since r278439) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4c772e26dabdf8e2bf2d26d0d7f8e60d97f3f4e;p=gcc.git re PR target/92744 (error: insn does not satisfy its constraints since r278439) PR target/92744 * config/i386/i386.md (peephole2 for *swap): Use general_reg_operand predicates instead of register_operand. * g++.dg/dfp/pr92744.C: New test. From-SVN: r278924 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e06244ccaf8..a89c4352aa3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-12-03 Uroš Bizjak + Jakub Jelinek + + PR target/92744 + * config/i386/i386.md (peephole2 for *swap): Use + general_reg_operand predicates instead of register_operand. + 2019-12-03 Richard Biener PR tree-optimization/92645 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 7ff5872ba43..2d43992724f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2788,10 +2788,10 @@ (set_attr "bdver1_decode" "double")]) (define_peephole2 - [(set (match_operand:SWI 0 "register_operand") - (match_operand:SWI 1 "register_operand")) + [(set (match_operand:SWI 0 "general_reg_operand") + (match_operand:SWI 1 "general_reg_operand")) (set (match_dup 1) - (match_operand:SWI 2 "register_operand")) + (match_operand:SWI 2 "general_reg_operand")) (set (match_dup 2) (match_dup 0))] "peep2_reg_dead_p (3, operands[0]) && optimize_insn_for_size_p ()" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b0d0a36327..2d8c350d575 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-12-03 Jakub Jelinek + PR target/92744 + * g++.dg/dfp/pr92744.C: New test. + PR c++/92732 * g++.dg/cpp2a/bitfield3.C: Don't expect narrowing conversion warnings. diff --git a/gcc/testsuite/g++.dg/dfp/pr92744.C b/gcc/testsuite/g++.dg/dfp/pr92744.C new file mode 100644 index 00000000000..5026e8d7db5 --- /dev/null +++ b/gcc/testsuite/g++.dg/dfp/pr92744.C @@ -0,0 +1,20 @@ +// PR target/92744 +// { dg-do compile } +// { dg-options "-Os -fno-tree-ccp" } + +typedef float T __attribute__((mode(SD))); +struct A { T a; }; +void foo (); + +bool +operator!= (A x, A y) +{ + return x.a != y.a; +} + +void +bar (A x, A y) +{ + if (x != y) + foo (); +}