Skip to content

Commit 9c9f940

Browse files
committed
[FPEnv][CostModel] Correct strictfp test.
Correct strictfp tests to follow the rules documented in the LangRef: https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics These tests needed the strictfp attribute added to some function definitions. Test changes verified with D146845.
1 parent f599116 commit 9c9f940

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ define void @log2(float %a, <16 x float> %va) {
124124
ret void
125125
}
126126

127-
define void @constrained_fadd(float %a, <16 x float> %va) {
127+
define void @constrained_fadd(float %a, <16 x float> %va) strictfp {
128128
; THRU-LABEL: 'constrained_fadd'
129129
; 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")
130130
; THRU-NEXT: Cost Model: Found an estimated cost of 48 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")

llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ define void @log2(float %a, <16 x float> %va) {
178178
ret void
179179
}
180180

181-
define void @constrained_fadd(float %a, <16 x float> %va) {
181+
define void @constrained_fadd(float %a, <16 x float> %va) strictfp {
182182
; THRU-LABEL: 'constrained_fadd'
183183
; 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")
184184
; 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")

0 commit comments

Comments
 (0)