This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/43430] New: Missed vectorization: "stmt not supported: cond_expr"


This code from FFmpeg is not vectorized:

gcc-4.5 -c vsad_intra.c -O3 -ffast-math -ftree-vectorizer-verbose=7 -msse2
[...]
vsad_intra.c:15: note: not vectorized: relevant stmt not supported: iftmp.0_7 =
[cond_expr] iftmp.0_35 < 0 ? iftmp.0_77 : iftmp.0_35;


typedef short DCTELEM;
typedef unsigned char uint8_t;
typedef long int x86_reg;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;

int
vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h)
{
  int score = 0;
  int x, y;

  for (y = 1; y < h; y++)
    {
      for (x = 0; x < 16; x++)
        {
          score +=
            ((s1[x] - s2[x] - s1[x + stride] + s2[x + stride]) >=
             0 ? (s1[x] - s2[x] - s1[x + stride] +
                  s2[x + stride]) : (-(s1[x] - s2[x] - s1[x + stride] +
                                       s2[x + stride])));
        }
      s1 += stride;
      s2 += stride;
    }

  return score;
}


-- 
           Summary: Missed vectorization: "stmt not supported: cond_expr"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spop at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43430


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]