Using snapshot: gcc-4.3-20071109

Problem code follows:
///////
#include <emmintrin.h>

class Vec {
    __m128i vec;
public:
    Vec(int mm) {
        vec = _mm_set1_epi16(mm);
    }
    operator __m128i() const {
        return vec;
    }
};

int main() {
    _mm_shuffle_epi32(Vec(5), _MM_SHUFFLE(3,3,3,3));  // error
}
///////

This compiles fine with e.g. -O2, but with optimisations off, gcc reports
"error: can't convert value to a vector".

This seems to be because a macro version of _mm_shuffle_epi32 is used when
optimisations are off, and the type conversion from Vec to __mm128i can't
happen for the first parameter.


-- 
           Summary: SSE2 intrinsics - emmintrin with optimisations off and
                    type conversion error
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lo at meep dot co dot uk


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

Reply via email to