aboutsummaryrefslogtreecommitdiff
path: root/llvm/test
diff options
context:
space:
mode:
authorKevin P. Neal <kevin.neal@sas.com>2024-04-02 13:47:28 -0400
committerKevin P. Neal <kevin.neal@sas.com>2024-04-02 13:53:56 -0400
commit9c9f94063ce1bd819ba4482f537d1e580dd31eef (patch)
tree97ddf39931171312abfc7f4a98f29802e458a5b3 /llvm/test
parentf5991161529511ca6ebc058da2a0507c2fc5283e (diff)
downloadllvm-9c9f94063ce1bd819ba4482f537d1e580dd31eef.zip
llvm-9c9f94063ce1bd819ba4482f537d1e580dd31eef.tar.gz
llvm-9c9f94063ce1bd819ba4482f537d1e580dd31eef.tar.bz2
[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.
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll2
-rw-r--r--llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll b/llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
index d58f334..2823ab4 100644
--- a/llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
+++ b/llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
@@ -124,7 +124,7 @@ define void @log2(float %a, <16 x float> %va) {
ret void
}
-define void @constrained_fadd(float %a, <16 x float> %va) {
+define void @constrained_fadd(float %a, <16 x float> %va) strictfp {
; THRU-LABEL: 'constrained_fadd'
; 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")
; 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")
diff --git a/llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll b/llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
index f5936a7..10786e1 100644
--- a/llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
+++ b/llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
@@ -178,7 +178,7 @@ define void @log2(float %a, <16 x float> %va) {
ret void
}
-define void @constrained_fadd(float %a, <16 x float> %va) {
+define void @constrained_fadd(float %a, <16 x float> %va) strictfp {
; THRU-LABEL: 'constrained_fadd'
; 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")
; 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")