On 12/09/2016 12:49 PM, Bernd Schmidt wrote:
On 12/03/2016 10:49 AM, Uros Bizjak wrote:

Based on the above explanation, the patch is OK.

I'll be treating the ifcvt part of it as obvious. However, testing
showed an issue with the i386 funcspec-11 test:

/* PR target/36936 */
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-O2 -march=i386" } */
/* { dg-final { scan-assembler "cmov" } } */

extern int foo (int) __attribute__((__target__("arch=i686")));

int
foo (int x)
{
  if (x < 0)
    x = 1;
  return x;
}

It wants to test that we can temporarily switch the arch, but we're
still using the i386 cost table, with a branch cost of 1. This means the
cmov now won't get generated for cost reasons.

It seems like whether we're generating cmov when tuning for i386 isn't
the most critical thing to worry about, so I propose amending the test
to also pass in -mtune=i686. Ok with that change?

Ping?


Bernd

Reply via email to