You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CostModel] avoid crashing while finding scalarization overhead
The constrained intrinsics have metadata arguments, so the
tests here were crashing as noted in D90554 (and that was
reverted even though this bug exists independently of that
change).
definevoid@constrained_fadd(float%a, <16 x float> %va) {
119
+
; THRU-LABEL: 'constrained_fadd'
120
+
; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
121
+
; THRU-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
122
+
; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
123
+
;
124
+
; LATE-LABEL: 'constrained_fadd'
125
+
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
126
+
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
127
+
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
128
+
;
129
+
; SIZE-LABEL: 'constrained_fadd'
130
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
131
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
132
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
133
+
;
134
+
; SIZE_LATE-LABEL: 'constrained_fadd'
135
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
136
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
137
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
definevoid@constrained_fadd(float%a, <16 x float> %va) {
150
+
; THRU-LABEL: 'constrained_fadd'
151
+
; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
152
+
; THRU-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
153
+
; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
154
+
;
155
+
; LATE-LABEL: 'constrained_fadd'
156
+
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
157
+
; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
158
+
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
159
+
;
160
+
; SIZE-LABEL: 'constrained_fadd'
161
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
162
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
163
+
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
164
+
;
165
+
; SIZE_LATE-LABEL: 'constrained_fadd'
166
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call float @llvm.experimental.constrained.fadd.f32(float %a, float %a, metadata !"round.dynamic", metadata !"fpexcept.ignore")
167
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %t = call <16 x float> @llvm.experimental.constrained.fadd.v16f32(<16 x float> %va, <16 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.ignore")
168
+
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
0 commit comments