From: Jeff Law Date: Wed, 27 May 2015 21:13:25 +0000 (-0600) Subject: re PR target/39726 ([cond-optab] ColdFire pessimizations on QImode/HImode tests) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b60685a379cabc5be2a633696318fb0364b45a78;p=gcc.git re PR target/39726 ([cond-optab] ColdFire pessimizations on QImode/HImode tests) PR target/39726 * gcc.dg/target/m68k/pr39726-1.c: New test. From-SVN: r223781 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76bb537db1b..6528d42438a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2964,6 +2964,7 @@ 2015-05-07 Jeff Law + PR target/39726 * match.pd (bit_and (plus/minus (convert @0) (convert @1) mask): New simplifier to narrow arithmetic. * generic-match-head.c: (types_match, single_use): New functions. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1923a2f2fba..a1a242e3bb5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-27 Jeff Law + + PR target/39726 + * gcc.dg/target/m68k/pr39726-1.c: New test. + 2015-05-27 Nathan Sidwell PR c++/66270 diff --git a/gcc/testsuite/gcc.target/m68k/pr39726.c b/gcc/testsuite/gcc.target/m68k/pr39726.c new file mode 100644 index 00000000000..94d41ba2159 --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/pr39726.c @@ -0,0 +1,65 @@ +/* { dg-do assemble } /* +/* { dg-options "-O2 -fomit-frame-pointer" } */ +/* { dg-final { object-size text <= 228 } } */ + +unsigned char v; + +int a0bs (unsigned char u, unsigned char w) +{ + if ((u - w) & 0x80) + v = 1; +} + +int a1bs (unsigned char u, unsigned char w) +{ + if ((u + w) & 0x80) + v = 1; +} + +int a0b (unsigned char u, unsigned char w) +{ + if ((u - w) & 0x22) + v = 1; +} + +int a1b (unsigned char u, unsigned char w) +{ + if ((u + w) & 0x22) + v = 1; +} + +int a0ws (unsigned short u, unsigned short w) +{ + if ((u - w) & 0x8000) + v = 1; +} + +int a1ws (unsigned short u, unsigned short w) +{ + if ((u + w) & 0x8000) + v = 1; +} + +int a0wbs (unsigned short u, unsigned short w) +{ + if ((u - w) & 0x80) + v = 1; +} + +int a1wbs (unsigned short u, unsigned short w) +{ + if ((u + w) & 0x80) + v = 1; +} + +int a0w (unsigned short u, unsigned short w) +{ + if ((u - w) & 0x8421) + v = 1; +} + +int a1w (unsigned short u, unsigned short w) +{ + if ((u + w) & 0x8421) + v = 1; +}