From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGen/mmx-shift-with-immediate.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 clang/test/CodeGen/mmx-shift-with-immediate.c (limited to 'clang/test/CodeGen/mmx-shift-with-immediate.c') diff --git a/clang/test/CodeGen/mmx-shift-with-immediate.c b/clang/test/CodeGen/mmx-shift-with-immediate.c new file mode 100644 index 0000000..ecd1881 --- /dev/null +++ b/clang/test/CodeGen/mmx-shift-with-immediate.c @@ -0,0 +1,23 @@ +// RUN: %clang -mmmx -target i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s +#include + +void shift(__m64 a, __m64 b, int c) { + // CHECK: x86_mmx @llvm.x86.mmx.pslli.w(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_slli_pi16(a, c); + // CHECK: x86_mmx @llvm.x86.mmx.pslli.d(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_slli_pi32(a, c); + // CHECK: x86_mmx @llvm.x86.mmx.pslli.q(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_slli_si64(a, c); + + // CHECK: x86_mmx @llvm.x86.mmx.psrli.w(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_srli_pi16(a, c); + // CHECK: x86_mmx @llvm.x86.mmx.psrli.d(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_srli_pi32(a, c); + // CHECK: x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_srli_si64(a, c); + + // CHECK: x86_mmx @llvm.x86.mmx.psrai.w(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_srai_pi16(a, c); + // CHECK: x86_mmx @llvm.x86.mmx.psrai.d(x86_mmx %{{.*}}, i32 {{.*}}) + _mm_srai_pi32(a, c); +} -- cgit v1.2.3