|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 |
| -; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X86-SSE |
3 |
| -; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=X86-AVX |
4 |
| -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64-SSE |
5 |
| -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=X64-AVX |
| 2 | +; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+mmx,+sse2 | FileCheck %s --check-prefixes=X86,X86-SSE |
| 3 | +; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+mmx,+avx | FileCheck %s --check-prefixes=X86,X86-AVX |
| 4 | +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+mmx,+sse2 | FileCheck %s --check-prefixes=X64,X64-SSE |
| 5 | +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+mmx,+avx | FileCheck %s --check-prefixes=X64,X64-AVX |
6 | 6 |
|
7 | 7 | define i32 @f(<4 x float> %A, ptr %B, <2 x double> %C, i32 %D, <2 x i64> %E, <4 x i32> %F, <8 x i16> %G, <16 x i8> %H, i64 %I, ptr %loadptr) nounwind {
|
8 | 8 | ; X86-SSE-LABEL: f:
|
@@ -176,4 +176,28 @@ define i32 @f(<4 x float> %A, ptr %B, <2 x double> %C, i32 %D, <2 x i64> %E, <4
|
176 | 176 | ret i32 %sum8
|
177 | 177 | }
|
178 | 178 |
|
| 179 | +define void @test_mmx(ptr nocapture %a0, ptr nocapture %a1) { |
| 180 | +; X86-LABEL: test_mmx: |
| 181 | +; X86: # %bb.0: # %entry |
| 182 | +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax |
| 183 | +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx |
| 184 | +; X86-NEXT: movq (%ecx), %mm0 |
| 185 | +; X86-NEXT: psrlq $3, %mm0 |
| 186 | +; X86-NEXT: movq %mm0, (%eax) |
| 187 | +; X86-NEXT: retl |
| 188 | +; |
| 189 | +; X64-LABEL: test_mmx: |
| 190 | +; X64: # %bb.0: # %entry |
| 191 | +; X64-NEXT: movq (%rdi), %mm0 |
| 192 | +; X64-NEXT: psrlq $3, %mm0 |
| 193 | +; X64-NEXT: movq %mm0, (%rsi) |
| 194 | +; X64-NEXT: retq |
| 195 | +entry: |
| 196 | + %0 = load x86_mmx, ptr %a0 |
| 197 | + %1 = call x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx %0, i32 3) |
| 198 | + store x86_mmx %1, ptr %a1, align 8, !nontemporal !0 |
| 199 | + ret void |
| 200 | +} |
| 201 | +declare x86_mmx @llvm.x86.mmx.psrli.q(x86_mmx, i32) nounwind readnone |
| 202 | + |
179 | 203 | !0 = !{i32 1}
|
0 commit comments