diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/widen_cast-3.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/widen_cast-3.ll | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/X86/widen_cast-3.ll b/llvm/test/CodeGen/X86/widen_cast-3.ll index 40a8dc5b6ae..ef0737713ab 100644 --- a/llvm/test/CodeGen/X86/widen_cast-3.ll +++ b/llvm/test/CodeGen/X86/widen_cast-3.ll @@ -1,14 +1,25 @@ -; RUN: llc < %s -march=x86 -mattr=+sse4.2 | FileCheck %s -; CHECK: paddd -; CHECK: pextrd -; CHECK: pextrd +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse4.2 | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse4.2 | FileCheck %s --check-prefix=X64 ; bitcast v12i8 to v3i32 -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i686-apple-darwin10.0.0d2" - define void @convert(<12 x i8>* %dst.addr, <3 x i32> %src) nounwind { +; X86-LABEL: convert: +; X86: ## BB#0: ## %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: paddd LCPI0_0, %xmm0 +; X86-NEXT: pextrd $2, %xmm0, 8(%eax) +; X86-NEXT: pextrd $1, %xmm0, 4(%eax) +; X86-NEXT: movd %xmm0, (%eax) +; X86-NEXT: retl +; +; X64-LABEL: convert: +; X64: ## BB#0: ## %entry +; X64-NEXT: paddd {{.*}}(%rip), %xmm0 +; X64-NEXT: pextrd $2, %xmm0, 8(%rdi) +; X64-NEXT: movq %xmm0, (%rdi) +; X64-NEXT: retq entry: %add = add <3 x i32> %src, < i32 1, i32 1, i32 1 > ; <<3 x i32>> [#uses=1] %conv = bitcast <3 x i32> %add to <12 x i8> ; <<12 x i8>> [#uses=1] |