2016-04-02 03:42:23 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=i686-apple-darwin9.2.2 -mattr=+sse2,-sse4.1 | FileCheck %s --check-prefix=X32
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin9.2.2 -mattr=+sse2,-sse4.1 | FileCheck %s --check-prefix=X64
|
2008-04-26 05:26:59 +08:00
|
|
|
|
|
|
|
define <8 x float> @f(<8 x float> %a, i32 %b) nounwind {
|
2016-04-02 03:42:23 +08:00
|
|
|
; X32-LABEL: f:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X32: ## %bb.0: ## %entry
|
2016-04-02 03:42:23 +08:00
|
|
|
; X32-NEXT: pushl %ebp
|
|
|
|
; X32-NEXT: movl %esp, %ebp
|
|
|
|
; X32-NEXT: andl $-32, %esp
|
|
|
|
; X32-NEXT: subl $64, %esp
|
|
|
|
; X32-NEXT: movl 8(%ebp), %eax
|
2017-01-11 06:02:30 +08:00
|
|
|
; X32-NEXT: andl $7, %eax
|
2016-04-02 03:42:23 +08:00
|
|
|
; X32-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)
|
|
|
|
; X32-NEXT: movaps %xmm0, (%esp)
|
|
|
|
; X32-NEXT: movl $1084227584, (%esp,%eax,4) ## imm = 0x40A00000
|
|
|
|
; X32-NEXT: movaps (%esp), %xmm0
|
|
|
|
; X32-NEXT: movaps {{[0-9]+}}(%esp), %xmm1
|
|
|
|
; X32-NEXT: movl %ebp, %esp
|
|
|
|
; X32-NEXT: popl %ebp
|
|
|
|
; X32-NEXT: retl
|
|
|
|
;
|
|
|
|
; X64-LABEL: f:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: ## %bb.0: ## %entry
|
2016-04-02 03:42:23 +08:00
|
|
|
; X64-NEXT: pushq %rbp
|
|
|
|
; X64-NEXT: movq %rsp, %rbp
|
|
|
|
; X64-NEXT: andq $-32, %rsp
|
|
|
|
; X64-NEXT: subq $64, %rsp
|
2018-02-01 06:04:26 +08:00
|
|
|
; X64-NEXT: ## kill: def $edi killed $edi def $rdi
|
2016-04-02 03:42:23 +08:00
|
|
|
; X64-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
|
|
|
|
; X64-NEXT: movaps %xmm0, (%rsp)
|
2017-01-11 06:02:30 +08:00
|
|
|
; X64-NEXT: andl $7, %edi
|
|
|
|
; X64-NEXT: movl $1084227584, (%rsp,%rdi,4) ## imm = 0x40A00000
|
2016-04-02 03:42:23 +08:00
|
|
|
; X64-NEXT: movaps (%rsp), %xmm0
|
|
|
|
; X64-NEXT: movaps {{[0-9]+}}(%rsp), %xmm1
|
|
|
|
; X64-NEXT: movq %rbp, %rsp
|
|
|
|
; X64-NEXT: popq %rbp
|
|
|
|
; X64-NEXT: retq
|
2008-04-26 05:26:59 +08:00
|
|
|
entry:
|
2016-04-02 03:42:23 +08:00
|
|
|
%vecins = insertelement <8 x float> %a, float 5.000000e+00, i32 %b
|
|
|
|
ret <8 x float> %vecins
|
2008-04-26 05:26:59 +08:00
|
|
|
}
|