Vector intrinsics don't work

I get the following warning when I attempt to use vector intrinsics:

PGCC-W-0277-Cannot inline function _mm_add_ps - data type mismatch

The assembly output shows that the compiler doesn’t generate vector code, but calls the non-existing function _mm_add_ps.

However, automatic vectorization works fine.

My test code is:

#include <emmintrin.h>
__m128 a, b, c;

void function1() {
  a  = _mm_add_ps(b, c);
}

I am using pgcpp version 7.1-4 under Windows 2000, 32 bit.

I got exactly the same error in Linux, 32- and 64 bit.

I tried version 7.0-7 and it doesn’t have this error. But the performance is extremely poor for vector intrinsics.

Hi,

Thanks for reporting a bug to us. We have filed a TPR # 14313 for inlining problem in C++.

We are also working on the intrinsic performance under TPR # 4285.

Hongyon

Hi,
Can you please post an update on this.
I have just started with pgCC coming from g++ and bummer, intrinsics do not work (see below).
Thanks,

  • Alex

pgCC -Mvect=sse -o nada nada.cc

PGCC-W-0277-Cannot inline function _mm_set1_ps - data type mismatch (nada.c: 10)
PGCC/x86 Linux 7.1-1: compilation completed with warnings
/tmp/pgCCLK-eVvGbF-nI.o: In function main': nada.c:(.text+0x2a): undefined reference to _mm_set1_ps’

simple test code is:

#include <pmmintrin.h> // for SSE3

#ifndef SSE3
#error “SSE3 is needed to run this program”
#endif

int main( int argc, char * argv )
{
__m128 zero = _mm_set1_ps(0.0);

return 0;
}

Hi Alex,

This will be fixed in 7.2 release.

Thank you for your patience.
Hongyon