[llvm] 5460b45 - AMDGPU: Rename test functions and add some cases for consistency
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 12:56:26 PST 2022
Author: Matt Arsenault
Date: 2022-12-07T15:56:21-05:00
New Revision: 5460b45564c79214e957eab41902a7a4741dd86a
URL: https://github.com/llvm/llvm-project/commit/5460b45564c79214e957eab41902a7a4741dd86a
DIFF: https://github.com/llvm/llvm-project/commit/5460b45564c79214e957eab41902a7a4741dd86a.diff
LOG: AMDGPU: Rename test functions and add some cases for consistency
Test all the permutations.
Added:
Modified:
llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll b/llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll
index 8d2c3d9a6f31e..7170cc8e49a86 100644
--- a/llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll
+++ b/llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll
@@ -2,78 +2,185 @@
; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -inline < %s | FileCheck %s
; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes='cgscc(inline)' < %s | FileCheck %s
-define i32 @func_default() #0 {
+define i32 @func_default() {
; CHECK-LABEL: @func_default(
; CHECK-NEXT: ret i32 0
;
ret i32 0
}
-define i32 @func_denormal_fp_math_ieee_ieee() #1 {
-; CHECK-LABEL: @func_denormal_fp_math_ieee_ieee(
-; CHECK-NEXT: ret i32 0
+define i32 @func_ieee_ieee() #0 {
+; CHECK-LABEL: @func_ieee_ieee(
+; CHECK-NEXT: ret i32 1
;
- ret i32 0
+ ret i32 1
}
-define i32 @func_denormal_fp_math_flush_flush() #2 {
-; CHECK-LABEL: @func_denormal_fp_math_flush_flush(
-; CHECK-NEXT: ret i32 0
+define i32 @func_psz_psz() #1 {
+; CHECK-LABEL: @func_psz_psz(
+; CHECK-NEXT: ret i32 2
;
- ret i32 0
+ ret i32 2
+}
+
+define i32 @func_psz_ieee() #2 {
+; CHECK-LABEL: @func_psz_ieee(
+; CHECK-NEXT: ret i32 3
+;
+ ret i32 3
+}
+
+define i32 @func_ieee_psz() #3 {
+; CHECK-LABEL: @func_ieee_psz(
+; CHECK-NEXT: ret i32 4
+;
+ ret i32 4
}
-define i32 @call_func_ieee_ieee_from_flush_flush() #2 {
-; CHECK-LABEL: @call_func_ieee_ieee_from_flush_flush(
+define i32 @call_default_from_psz_psz() #1 {
+; CHECK-LABEL: @call_default_from_psz_psz(
; CHECK-NEXT: ret i32 0
;
- %call = call i32 @func_denormal_fp_math_ieee_ieee()
+ %call = call i32 @func_default()
+ ret i32 %call
+}
+
+define i32 @call_ieee_ieee_from_ieee_ieee() #0 {
+; CHECK-LABEL: @call_ieee_ieee_from_ieee_ieee(
+; CHECK-NEXT: ret i32 1
+;
+ %call = call i32 @func_ieee_ieee()
+ ret i32 %call
+}
+
+define i32 @call_ieee_ieee_from_psz_psz() #1 {
+; CHECK-LABEL: @call_ieee_ieee_from_psz_psz(
+; CHECK-NEXT: ret i32 1
+;
+ %call = call i32 @func_ieee_ieee()
ret i32 %call
}
-define i32 @call_func_flush_flush_from_ieee_ieee() #1 {
-; CHECK-LABEL: @call_func_flush_flush_from_ieee_ieee(
-; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_denormal_fp_math_flush_flush()
+define i32 @call_psz_psz_from_ieee_ieee() #0 {
+; CHECK-LABEL: @call_psz_psz_from_ieee_ieee(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_psz_psz()
; CHECK-NEXT: ret i32 [[CALL]]
;
- %call = call i32 @func_denormal_fp_math_flush_flush()
+ %call = call i32 @func_psz_psz()
ret i32 %call
}
-define i32 @func_denormal_fp_math_flush_ieee() #3 {
-; CHECK-LABEL: @func_denormal_fp_math_flush_ieee(
-; CHECK-NEXT: ret i32 0
+define i32 @call_psz_psz_from_psz_psz() #1 {
+; CHECK-LABEL: @call_psz_psz_from_psz_psz(
+; CHECK-NEXT: ret i32 2
;
- ret i32 0
+ %call = call i32 @func_psz_psz()
+ ret i32 %call
}
-define i32 @func_denormal_fp_math_ieee_flush() #4 {
-; CHECK-LABEL: @func_denormal_fp_math_ieee_flush(
-; CHECK-NEXT: ret i32 0
+define i32 @call_psz_ieee_from_psz_psz() #1 {
+; CHECK-LABEL: @call_psz_ieee_from_psz_psz(
+; CHECK-NEXT: ret i32 3
;
- ret i32 0
+ %call = call i32 @func_psz_ieee()
+ ret i32 %call
+}
+
+define i32 @call_ieee_psz_from_psz_psz() #1 {
+; CHECK-LABEL: @call_ieee_psz_from_psz_psz(
+; CHECK-NEXT: ret i32 4
+;
+ %call = call i32 @func_ieee_psz()
+ ret i32 %call
+}
+
+define i32 @call_psz_ieee_from_ieee_ieee() #0 {
+; CHECK-LABEL: @call_psz_ieee_from_ieee_ieee(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_psz_ieee()
+; CHECK-NEXT: ret i32 [[CALL]]
+;
+ %call = call i32 @func_psz_ieee()
+ ret i32 %call
+}
+
+define i32 @call_ieee_psz_from_ieee_ieee() #0 {
+; CHECK-LABEL: @call_ieee_psz_from_ieee_ieee(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_ieee_psz()
+; CHECK-NEXT: ret i32 [[CALL]]
+;
+ %call = call i32 @func_ieee_psz()
+ ret i32 %call
+}
+
+define i32 @call_ieee_ieee_from_psz_ieee() #2 {
+; CHECK-LABEL: @call_ieee_ieee_from_psz_ieee(
+; CHECK-NEXT: ret i32 1
+;
+ %call = call i32 @func_ieee_ieee()
+ ret i32 %call
+}
+
+define i32 @call_psz_ieee_from_psz_ieee() #2 {
+; CHECK-LABEL: @call_psz_ieee_from_psz_ieee(
+; CHECK-NEXT: ret i32 3
+;
+ %call = call i32 @func_psz_ieee()
+ ret i32 %call
+}
+
+define i32 @call_ieee_psz_from_psz_ieee() #2 {
+; CHECK-LABEL: @call_ieee_psz_from_psz_ieee(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_ieee_psz()
+; CHECK-NEXT: ret i32 [[CALL]]
+;
+ %call = call i32 @func_ieee_psz()
+ ret i32 %call
+}
+
+define i32 @call_psz_psz_from_psz_ieee() #2 {
+; CHECK-LABEL: @call_psz_psz_from_psz_ieee(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_psz_psz()
+; CHECK-NEXT: ret i32 [[CALL]]
+;
+ %call = call i32 @func_psz_psz()
+ ret i32 %call
}
-define i32 @call_func_flush_ieee_from_ieee_ieee() #1 {
-; CHECK-LABEL: @call_func_flush_ieee_from_ieee_ieee(
-; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_denormal_fp_math_flush_ieee()
+define i32 @call_ieee_ieee_from_ieee_psz() #3 {
+; CHECK-LABEL: @call_ieee_ieee_from_ieee_psz(
+; CHECK-NEXT: ret i32 1
+;
+ %call = call i32 @func_ieee_ieee()
+ ret i32 %call
+}
+
+define i32 @call_psz_ieee_from_ieee_psz() #3 {
+; CHECK-LABEL: @call_psz_ieee_from_ieee_psz(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_psz_ieee()
; CHECK-NEXT: ret i32 [[CALL]]
;
- %call = call i32 @func_denormal_fp_math_flush_ieee()
+ %call = call i32 @func_psz_ieee()
+ ret i32 %call
+}
+
+define i32 @call_ieee_psz_from_ieee_psz() #3 {
+; CHECK-LABEL: @call_ieee_psz_from_ieee_psz(
+; CHECK-NEXT: ret i32 4
+;
+ %call = call i32 @func_ieee_psz()
ret i32 %call
}
-define i32 @call_func_ieee_flush_from_ieee_ieee() #1 {
-; CHECK-LABEL: @call_func_ieee_flush_from_ieee_ieee(
-; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_denormal_fp_math_ieee_flush()
+define i32 @call_psz_psz_from_ieee_psz() #3 {
+; CHECK-LABEL: @call_psz_psz_from_ieee_psz(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @func_psz_psz()
; CHECK-NEXT: ret i32 [[CALL]]
;
- %call = call i32 @func_denormal_fp_math_ieee_flush()
+ %call = call i32 @func_psz_psz()
ret i32 %call
}
-attributes #0 = { nounwind }
-attributes #1 = { nounwind "denormal-fp-math"="ieee,ieee" }
-attributes #2 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" }
-attributes #3 = { nounwind "denormal-fp-math"="preserve-sign,ieee" }
-attributes #4 = { nounwind "denormal-fp-math"="ieee,preserve-sign" }
+attributes #0 = { "denormal-fp-math"="ieee,ieee" }
+attributes #1 = { "denormal-fp-math"="preserve-sign,preserve-sign" }
+attributes #2 = { "denormal-fp-math"="preserve-sign,ieee" }
+attributes #3 = { "denormal-fp-math"="ieee,preserve-sign" }
More information about the llvm-commits
mailing list