Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 1 | // RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s |
| 2 | #include <mmintrin.h> |
| 3 | |
| 4 | void shift(__m64 a, __m64 b, int c) { |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 5 | // CHECK: x86_mmx @llvm.x86.mmx.pslli.w(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 6 | _mm_slli_pi16(a, c); |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 7 | // CHECK: x86_mmx @llvm.x86.mmx.pslli.d(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 8 | _mm_slli_pi32(a, c); |
Bill Wendling | eb7fe36 | 2010-10-06 03:31:26 +0000 | [diff] [blame] | 9 | // CHECK: x86_mmx @llvm.x86.mmx.pslli.q(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 10 | _mm_slli_si64(a, c); |
| 11 | |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 12 | // CHECK: x86_mmx @llvm.x86.mmx.psrli.w(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 13 | _mm_srli_pi16(a, c); |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 14 | // CHECK: x86_mmx @llvm.x86.mmx.psrli.d(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 15 | _mm_srli_pi32(a, c); |
Bill Wendling | eb7fe36 | 2010-10-06 03:31:26 +0000 | [diff] [blame] | 16 | // CHECK: x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 17 | _mm_srli_si64(a, c); |
| 18 | |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 19 | // CHECK: x86_mmx @llvm.x86.mmx.psrai.w(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 20 | _mm_srai_pi16(a, c); |
Dale Johannesen | d47e262 | 2010-09-30 23:57:50 +0000 | [diff] [blame] | 21 | // CHECK: x86_mmx @llvm.x86.mmx.psrai.d(x86_mmx %{{.*}}, i32 {{.*}}) |
Bill Wendling | 1dfc212 | 2010-09-18 00:26:29 +0000 | [diff] [blame] | 22 | _mm_srai_pi32(a, c); |
| 23 | } |