1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 #RUN: llc -mtriple=x86_64-linux-gnu -mattr=+sse2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK_SMALL --check-prefix=CHECK_SMALL64 --check-prefix=CHECK_NOPIC64
3 #RUN: llc -mtriple=x86_64-linux-gnu -mattr=+sse2 -code-model=large -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK_LARGE --check-prefix=CHECK_LARGE64
4 #RUN: llc -mtriple=i386-linux-gnu -mattr=+sse2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK_SMALL --check-prefix=CHECK_SMALL32
5 #RUN: llc -mtriple=i386-linux-gnu -mattr=+sse2 -code-model=large -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK_LARGE --check-prefix=CHECK_LARGE32
6 #RUN: llc -mtriple=x86_64-linux-gnu -mattr=+sse2 -relocation-model=pic -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK_SMALL --check-prefix=CHECK_SMALL64 --check-prefix=CHECK_PIC64
9 define float @test_float() {
11 ret float 5.500000e+00
14 define double @test_double() {
16 ret double 5.500000e+00
24 tracksRegLiveness: true
26 - { id: 0, class: vecr, preferred-register: '' }
31 ; CHECK_NOPIC64-LABEL: name: test_float
32 ; CHECK_NOPIC64: [[MOVSSrm_alt:%[0-9]+]]:fr32 = MOVSSrm_alt $rip, 1, $noreg, %const.0, $noreg
33 ; CHECK_NOPIC64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSSrm_alt]]
34 ; CHECK_NOPIC64: $xmm0 = COPY [[COPY]]
35 ; CHECK_NOPIC64: RET 0, implicit $xmm0
36 ; CHECK_LARGE64-LABEL: name: test_float
37 ; CHECK_LARGE64: [[MOV64ri:%[0-9]+]]:gr64 = MOV64ri %const.0
38 ; CHECK_LARGE64: [[MOVSSrm_alt:%[0-9]+]]:fr32 = MOVSSrm_alt [[MOV64ri]], 1, $noreg, 0, $noreg :: (load 8 from constant-pool, align 32)
39 ; CHECK_LARGE64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSSrm_alt]]
40 ; CHECK_LARGE64: $xmm0 = COPY [[COPY]]
41 ; CHECK_LARGE64: RET 0, implicit $xmm0
42 ; CHECK_SMALL32-LABEL: name: test_float
43 ; CHECK_SMALL32: [[MOVSSrm_alt:%[0-9]+]]:fr32 = MOVSSrm_alt $noreg, 1, $noreg, %const.0, $noreg
44 ; CHECK_SMALL32: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSSrm_alt]]
45 ; CHECK_SMALL32: $xmm0 = COPY [[COPY]]
46 ; CHECK_SMALL32: RET 0, implicit $xmm0
47 ; CHECK_LARGE32-LABEL: name: test_float
48 ; CHECK_LARGE32: [[MOVSSrm_alt:%[0-9]+]]:fr32 = MOVSSrm_alt $noreg, 1, $noreg, %const.0, $noreg
49 ; CHECK_LARGE32: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSSrm_alt]]
50 ; CHECK_LARGE32: $xmm0 = COPY [[COPY]]
51 ; CHECK_LARGE32: RET 0, implicit $xmm0
52 ; CHECK_PIC64-LABEL: name: test_float
53 ; CHECK_PIC64: [[MOVSSrm_alt:%[0-9]+]]:fr32 = MOVSSrm_alt $rip, 1, $noreg, %const.0, $noreg
54 ; CHECK_PIC64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSSrm_alt]]
55 ; CHECK_PIC64: $xmm0 = COPY [[COPY]]
56 ; CHECK_PIC64: RET 0, implicit $xmm0
57 %0:vecr(s32) = G_FCONSTANT float 5.500000e+00
58 %1:vecr(s128) = G_ANYEXT %0(s32)
69 tracksRegLiveness: true
73 - { id: 0, class: vecr, preferred-register: '' }
78 ; CHECK_NOPIC64-LABEL: name: test_double
79 ; CHECK_NOPIC64: [[MOVSDrm_alt:%[0-9]+]]:fr64 = MOVSDrm_alt $rip, 1, $noreg, %const.0, $noreg
80 ; CHECK_NOPIC64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSDrm_alt]]
81 ; CHECK_NOPIC64: $xmm0 = COPY [[COPY]]
82 ; CHECK_NOPIC64: RET 0, implicit $xmm0
83 ; CHECK_LARGE64-LABEL: name: test_double
84 ; CHECK_LARGE64: [[MOV64ri:%[0-9]+]]:gr64 = MOV64ri %const.0
85 ; CHECK_LARGE64: [[MOVSDrm_alt:%[0-9]+]]:fr64 = MOVSDrm_alt [[MOV64ri]], 1, $noreg, 0, $noreg :: (load 8 from constant-pool, align 64)
86 ; CHECK_LARGE64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSDrm_alt]]
87 ; CHECK_LARGE64: $xmm0 = COPY [[COPY]]
88 ; CHECK_LARGE64: RET 0, implicit $xmm0
89 ; CHECK_SMALL32-LABEL: name: test_double
90 ; CHECK_SMALL32: [[MOVSDrm_alt:%[0-9]+]]:fr64 = MOVSDrm_alt $noreg, 1, $noreg, %const.0, $noreg
91 ; CHECK_SMALL32: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSDrm_alt]]
92 ; CHECK_SMALL32: $xmm0 = COPY [[COPY]]
93 ; CHECK_SMALL32: RET 0, implicit $xmm0
94 ; CHECK_LARGE32-LABEL: name: test_double
95 ; CHECK_LARGE32: [[MOVSDrm_alt:%[0-9]+]]:fr64 = MOVSDrm_alt $noreg, 1, $noreg, %const.0, $noreg
96 ; CHECK_LARGE32: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSDrm_alt]]
97 ; CHECK_LARGE32: $xmm0 = COPY [[COPY]]
98 ; CHECK_LARGE32: RET 0, implicit $xmm0
99 ; CHECK_PIC64-LABEL: name: test_double
100 ; CHECK_PIC64: [[MOVSDrm_alt:%[0-9]+]]:fr64 = MOVSDrm_alt $rip, 1, $noreg, %const.0, $noreg
101 ; CHECK_PIC64: [[COPY:%[0-9]+]]:vr128 = COPY [[MOVSDrm_alt]]
102 ; CHECK_PIC64: $xmm0 = COPY [[COPY]]
103 ; CHECK_PIC64: RET 0, implicit $xmm0
104 %0:vecr(s64) = G_FCONSTANT double 5.500000e+00
105 %1:vecr(s128) = G_ANYEXT %0(s64)
106 $xmm0 = COPY %1(s128)
107 RET 0, implicit $xmm0