blob: f430d2e4a2534cc99bc37cf4f110da122056745d [file] [log] [blame]
Bill Wendling1dfc2122010-09-18 00:26:29 +00001// RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
2#include <mmintrin.h>
3
4void shift(__m64 a, __m64 b, int c) {
Dale Johannesend47e2622010-09-30 23:57:50 +00005 // CHECK: x86_mmx @llvm.x86.mmx.pslli.w(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +00006 _mm_slli_pi16(a, c);
Dale Johannesend47e2622010-09-30 23:57:50 +00007 // CHECK: x86_mmx @llvm.x86.mmx.pslli.d(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +00008 _mm_slli_pi32(a, c);
Bill Wendlingeb7fe362010-10-06 03:31:26 +00009 // CHECK: x86_mmx @llvm.x86.mmx.pslli.q(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000010 _mm_slli_si64(a, c);
11
Dale Johannesend47e2622010-09-30 23:57:50 +000012 // CHECK: x86_mmx @llvm.x86.mmx.psrli.w(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000013 _mm_srli_pi16(a, c);
Dale Johannesend47e2622010-09-30 23:57:50 +000014 // CHECK: x86_mmx @llvm.x86.mmx.psrli.d(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000015 _mm_srli_pi32(a, c);
Bill Wendlingeb7fe362010-10-06 03:31:26 +000016 // CHECK: x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000017 _mm_srli_si64(a, c);
18
Dale Johannesend47e2622010-09-30 23:57:50 +000019 // CHECK: x86_mmx @llvm.x86.mmx.psrai.w(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000020 _mm_srai_pi16(a, c);
Dale Johannesend47e2622010-09-30 23:57:50 +000021 // CHECK: x86_mmx @llvm.x86.mmx.psrai.d(x86_mmx %{{.*}}, i32 {{.*}})
Bill Wendling1dfc2122010-09-18 00:26:29 +000022 _mm_srai_pi32(a, c);
23}