public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/67329] New: [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu
@ 2015-08-23 14:33 julia.koval at intel dot com
  2015-08-23 14:42 ` [Bug target/67329] " pinskia at gcc dot gnu.org
  2015-08-24 15:25 ` hjl at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: julia.koval at intel dot com @ 2015-08-23 14:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67329

            Bug ID: 67329
           Summary: [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on
                    -march=pentium or -march=iamcu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: julia.koval at intel dot com
  Target Milestone: ---

The normal -m32 version optimizes the sum to just return 28. However if i use
-march=pentium: 191t.optimized dump has:
foo ()
{
  int sum;
  const int a[8];
  int _6;
  int _9;
  int _22;
  int _29;
  int _36;
  int _43;
  int _50;
  int _57;

  <bb 2>:
  a = *.LC0;
  _9 = a[0];
  _22 = a[1];
  sum_23 = _9 + _22;
  _29 = a[2];
  sum_30 = sum_23 + _29;
  _36 = a[3];
  sum_37 = sum_30 + _36;
  _43 = a[4];
  sum_44 = sum_37 + _43;
  _50 = a[5];
  sum_51 = sum_44 + _50;
  _57 = a[6];
  sum_58 = sum_51 + _57;
  _6 = a[7];
  sum_7 = _6 + sum_58;
  a ={v} {CLOBBER};
  return sum_7;

}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/67329] [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu
  2015-08-23 14:33 [Bug target/67329] New: [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu julia.koval at intel dot com
@ 2015-08-23 14:42 ` pinskia at gcc dot gnu.org
  2015-08-24 15:25 ` hjl at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-08-23 14:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67329

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a cost issue.
And even has this comment in the testcase:
/* See PR63679 and PR64159, if the target forces the initializer to memory then
   DOM is not able to perform this optimization.  */


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/67329] [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu
  2015-08-23 14:33 [Bug target/67329] New: [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu julia.koval at intel dot com
  2015-08-23 14:42 ` [Bug target/67329] " pinskia at gcc dot gnu.org
@ 2015-08-24 15:25 ` hjl at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: hjl at gcc dot gnu.org @ 2015-08-24 15:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67329

--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Mon Aug 24 15:24:44 2015
New Revision: 227132

URL: https://gcc.gnu.org/viewcvs?rev=227132&root=gcc&view=rev
Log:
Update MOVE_RATIO cost for IA MCU

This patch updates MOVE_RATIO cost for IA MCU from 6 to 9 so that we
can unroll the loop completely for DOM with -mtune=iamcu.

gcc/

        PR target/67329
        * config/i386/i386.c (iamcu_cost): Set MOVE_RATIO cost to 9.

gcc/testsuite/

        PR target/67329
        * gcc.target/i386/pr67329.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr67329.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-24 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-23 14:33 [Bug target/67329] New: [5] gcc.dg/tree-ssa/ssa-dom-cse-2.c fails on -march=pentium or -march=iamcu julia.koval at intel dot com
2015-08-23 14:42 ` [Bug target/67329] " pinskia at gcc dot gnu.org
2015-08-24 15:25 ` hjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).