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

            Bug ID: 114943
           Summary: X86 AVX2: inefficient code generated to convert SIMD
                    Vectors
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
  Target Milestone: ---

in the example below (see https://godbolt.org/z/qnfT4fE5G )
convert and covert3 produce code that looks to me inefficient w/r/t convert2
(and clang)  for target x86-64-v3

#define VECTOR_EXT(N) __attribute__((vector_size(N)))
typedef float VECTOR_EXT(16) float32x4_t;
typedef double VECTOR_EXT(32) float64x4_t;

float32x4_t f1,f2,f3,f4,f;
float64x4_t d1,d2,d3,d4,d;


void covert() {
   for (int i=0;i<4;++i) {
    d1[i] = f1[i];
    d2[i] = f2[i];
    d3[i] = f3[i];
    d4[i] = f4[i];
  }

}

void covert2() {
   for (int i=0;i<4;++i)
    d1[i] = f1[i];
     for (int i=0;i<4;++i)
    d2[i] = f2[i];
     for (int i=0;i<4;++i)
    d3[i] = f3[i];
     for (int i=0;i<4;++i)
    d4[i] = f4[i];
}



void covert3() {
  d1 = __builtin_convertvector(f1,float64x4_t);
}
  • [Bug target/114943] New: X8... vincenzo.innocente at cern dot ch via Gcc-bugs

Reply via email to