graalvm / sulong

Obsolete repository. Moved to oracle/graal.
Other
628 stars 63 forks source link

Missing @llvm.x86.sse2.pmovmskb.128 builtin #845

Closed mrigger closed 6 years ago

mrigger commented 6 years ago

The armon-libart benchmark from https://github.com/jku-ssw/benchmarks/ fails to execute due to the missing LLVM builtin @llvm.x86.sse2.pmovmskb.128. I wrote a test case to reproduce the error:

#include <emmintrin.h>
#include <assert.h>

int main() {
    __m128i val1 = {54312, 32423};
    __m128i val2 = {0x80808080, 0x80808080};
    __m128i val3 = {0x8080808080808080L, 0x8080808080808080L};
    __m128i val4 = {0, 0};
    __m128i val5 = {-1, -1};
    assert(_mm_movemask_epi8(val1) == 258);
    assert(_mm_movemask_epi8(val2) == 0x0f0f);
    assert(_mm_movemask_epi8(val3) == 0xffff);
    assert(_mm_movemask_epi8(val4) == 0);
    assert(_mm_movemask_epi8(val5) == 0xffff);
}
lukasstadler commented 6 years ago

maybe you could give it a try and implement the missing builtin? ;-)

mrigger commented 6 years ago

Fixed by https://github.com/graalvm/sulong/commit/1a738625502c5b7c158128ad61c813c213c250bc