xref: /llvm-project/llvm/test/CodeGen/X86/illegal-insert.ll (revision 9b44b0318e7d6f6cb36327477fbf1bce768c9b76)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
3
4define <4 x double> @foo0(<4 x double> %t) {
5; CHECK-LABEL: foo0:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    movlps {{.*#+}} xmm0 = mem[0,1],xmm0[2,3]
8; CHECK-NEXT:    retq
9  %r = insertelement <4 x double> %t, double 2.3, i32 0
10  ret <4 x double> %r
11}
12define <4 x double> @foo1(<4 x double> %t) {
13; CHECK-LABEL: foo1:
14; CHECK:       # %bb.0:
15; CHECK-NEXT:    movhps {{.*#+}} xmm0 = xmm0[0,1],mem[0,1]
16; CHECK-NEXT:    retq
17  %r = insertelement <4 x double> %t, double 2.3, i32 1
18  ret <4 x double> %r
19}
20define <4 x double> @foo2(<4 x double> %t) {
21; CHECK-LABEL: foo2:
22; CHECK:       # %bb.0:
23; CHECK-NEXT:    movlps {{.*#+}} xmm1 = mem[0,1],xmm1[2,3]
24; CHECK-NEXT:    retq
25  %r = insertelement <4 x double> %t, double 2.3, i32 2
26  ret <4 x double> %r
27}
28define <4 x double> @foo3(<4 x double> %t) {
29; CHECK-LABEL: foo3:
30; CHECK:       # %bb.0:
31; CHECK-NEXT:    movhps {{.*#+}} xmm1 = xmm1[0,1],mem[0,1]
32; CHECK-NEXT:    retq
33  %r = insertelement <4 x double> %t, double 2.3, i32 3
34  ret <4 x double> %r
35}
36