llvm-project/clang/test/CodeGen/mmx-shift-with-immediate.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
904 B
C
Raw Normal View History

// RUN: %clang -mmmx -target i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
2010-09-18 08:26:29 +08:00
#include <mmintrin.h>
void shift(__m64 a, __m64 b, int c) {
// CHECK: x86_mmx @llvm.x86.mmx.pslli.w(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_slli_pi16(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.pslli.d(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_slli_pi32(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.pslli.q(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_slli_si64(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.psrli.w(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_srli_pi16(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.psrli.d(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_srli_pi32(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_srli_si64(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.psrai.w(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_srai_pi16(a, c);
// CHECK: x86_mmx @llvm.x86.mmx.psrai.d(x86_mmx %{{.*}}, i32 {{.*}})
2010-09-18 08:26:29 +08:00
_mm_srai_pi32(a, c);
}