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=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=CHECK_LARGE64 4#RUN: llc -mtriple=i386-linux-gnu -mattr=+sse2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --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=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=CHECK_PIC64 7 8--- | 9 define float @test_float() { 10 entry: 11 ret float 5.500000e+00 12 } 13 14 define double @test_double() { 15 entry: 16 ret double 5.500000e+00 17 } 18--- 19name: test_float 20# 21alignment: 16 22legalized: true 23regBankSelected: true 24tracksRegLiveness: true 25registers: 26 - { id: 0, class: vecr, preferred-register: '' } 27# 28# 29body: | 30 bb.1.entry: 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 4) 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) 59 $xmm0 = COPY %1(s128) 60 RET 0, implicit $xmm0 61 62... 63--- 64name: test_double 65# 66alignment: 16 67legalized: true 68regBankSelected: true 69tracksRegLiveness: true 70# 71# 72registers: 73 - { id: 0, class: vecr, preferred-register: '' } 74# 75# 76body: | 77 bb.1.entry: 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) 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 108 109... 110