From: Oleg Endo Date: Mon, 1 Dec 2014 23:53:12 +0000 (+0000) Subject: re PR rtl-optimization/59278 (combine does not replace matched insn) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70c9ce2d464a94125411bc8ac5c99cae6fc91afc;p=gcc.git re PR rtl-optimization/59278 (combine does not replace matched insn) testsuite/ PR rtl-optimization/59278 * gcc.target/sh/pr59278.c: New. From-SVN: r218251 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3f14726007c..dff9d0211bd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-12-01 Oleg Endo + + PR rtl-optimization/59278 + * gcc.target/sh/pr59278.c: New. + 2014-12-01 Paolo Carlini PR c++/60859 diff --git a/gcc/testsuite/gcc.target/sh/pr59278.c b/gcc/testsuite/gcc.target/sh/pr59278.c new file mode 100644 index 00000000000..563e5b72c08 --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/pr59278.c @@ -0,0 +1,19 @@ +/* Check that combine considers unused regs dead. */ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ +/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */ +/* { dg-final { scan-assembler "addc" } } */ + +struct result +{ + int a, b; +}; + +struct result +test_00 (int a, int b, int d) +{ + struct result r; + r.a = a != b; + r.b = d + b + 1; + return r; +}