1 # RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2 # This test ensures that the MIR parser parses constant pool constants and
3 # constant pool operands correctly.
7 define double @test(double %a, float %b) {
9 %c = fadd double %a, 3.250000e+00
10 %d = fadd float %b, 6.250000e+00
11 %e = fpext float %d to double
12 %f = fmul double %c, %e
16 define double @test2(double %a, float %b) {
18 %c = fadd double %a, 3.250000e+00
19 %d = fadd float %b, 6.250000e+00
20 %e = fpext float %d to double
21 %f = fmul double %c, %e
25 define double @test3(double %a, float %b) {
27 %c = fadd double %a, 3.250000e+00
28 %d = fadd float %b, 6.250000e+00
29 %e = fpext float %d to double
30 %f = fmul double %c, %e
34 define double @test4(double %a, float %b) {
36 %c = fadd double %a, 3.250000e+00
37 %d = fadd float %b, 6.250000e+00
38 %e = fpext float %d to double
39 %f = fmul double %c, %e
47 # CHECK-NEXT: value: 'double 3.250000e+00'
48 # CHECK-NEXT: alignment: 8
49 # CHECK-NEXT: isTargetSpecific: false
51 # CHECK-NEXT: value: 'float 6.250000e+00'
52 # CHECK-NEXT: alignment: 4
53 # CHECK-NEXT: isTargetSpecific: false
57 value: 'double 3.250000e+00'
60 value: 'float 6.250000e+00'
64 ; CHECK: $xmm0 = ADDSDrm killed $xmm0, $rip, 1, $noreg, %const.0, $noreg
65 ; CHECK-NEXT: $xmm1 = ADDSSrm killed $xmm1, $rip, 1, $noreg, %const.1, $noreg
66 $xmm0 = ADDSDrm killed $xmm0, $rip, 1, _, %const.0, _
67 $xmm1 = ADDSSrm killed $xmm1, $rip, 1, _, %const.1, _
68 $xmm1 = CVTSS2SDrr killed $xmm1
69 $xmm0 = MULSDrr killed $xmm0, killed $xmm1
73 # Verify that alignment can be inferred:
77 # CHECK-NEXT: value: 'double 3.250000e+00'
78 # CHECK-NEXT: alignment: 8
79 # CHECK-NEXT: isTargetSpecific: false
81 # CHECK-NEXT: value: 'float 6.250000e+00'
82 # CHECK-NEXT: alignment: 4
83 # CHECK-NEXT: isTargetSpecific: false
87 value: 'double 3.250000e+00'
89 value: 'float 6.250000e+00'
92 $xmm0 = ADDSDrm killed $xmm0, $rip, 1, _, %const.0, _
93 $xmm1 = ADDSSrm killed $xmm1, $rip, 1, _, %const.1, _
94 $xmm1 = CVTSS2SDrr killed $xmm1
95 $xmm0 = MULSDrr killed $xmm0, killed $xmm1
99 # Verify that the non-standard alignments are respected:
102 # CHECK-NEXT: - id: 0
103 # CHECK-NEXT: value: 'double 3.250000e+00'
104 # CHECK-NEXT: alignment: 128
105 # CHECK-NEXT: isTargetSpecific: false
106 # CHECK-NEXT: - id: 1
107 # CHECK-NEXT: value: 'float 6.250000e+00'
108 # CHECK-NEXT: alignment: 1
109 # CHECK-NEXT: isTargetSpecific: false
113 value: 'double 3.250000e+00'
116 value: 'float 6.250000e+00'
120 ; CHECK: $xmm0 = ADDSDrm killed $xmm0, $rip, 1, $noreg, %const.0, $noreg
121 ; CHECK-NEXT: $xmm1 = ADDSSrm killed $xmm1, $rip, 1, $noreg, %const.1, $noreg
122 $xmm0 = ADDSDrm killed $xmm0, $rip, 1, _, %const.0, _
123 $xmm1 = ADDSSrm killed $xmm1, $rip, 1, _, %const.1, _
124 $xmm1 = CVTSS2SDrr killed $xmm1
125 $xmm0 = MULSDrr killed $xmm0, killed $xmm1
133 value: 'double 3.250000e+00'
135 value: 'float 6.250000e+00'
138 ; CHECK: $xmm0 = ADDSDrm killed $xmm0, $rip, 1, $noreg, %const.1 - 12, $noreg
139 ; CHECK-NEXT: $xmm1 = ADDSSrm killed $xmm1, $rip, 1, $noreg, %const.0 + 8, $noreg
140 $xmm0 = ADDSDrm killed $xmm0, $rip, 1, _, %const.1 - 12, _
141 $xmm1 = ADDSSrm killed $xmm1, $rip, 1, _, %const.0 + 8, _
142 $xmm1 = CVTSS2SDrr killed $xmm1
143 $xmm0 = MULSDrr killed $xmm0, killed $xmm1