xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/vec_set-6.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=i386-unknown -mattr=+sse2,+sse4.1 | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test(float %a, float %b, float %c) nounwind {
5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test:
6*9880d681SAndroid Build Coastguard Worker; CHECK:       # BB#0:
7*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    movsd {{.*#+}} xmm1 = mem[0],zero
8*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
9*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    shufps {{.*#+}} xmm0 = xmm0[1,0],xmm1[0,1]
10*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    retl
11*9880d681SAndroid Build Coastguard Worker  %tmp = insertelement <4 x float> zeroinitializer, float %a, i32 1
12*9880d681SAndroid Build Coastguard Worker  %tmp8 = insertelement <4 x float> %tmp, float %b, i32 2
13*9880d681SAndroid Build Coastguard Worker  %tmp10 = insertelement <4 x float> %tmp8, float %c, i32 3
14*9880d681SAndroid Build Coastguard Worker  ret <4 x float> %tmp10
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17