-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMDGPU][NFC] Test clean up #85922
Merged
Merged
[AMDGPU][NFC] Test clean up #85922
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-backend-amdgpu Author: Pravin Jagtap (pravinjagtap) ChangesFull diff: https://github.com/llvm/llvm-project/pull/85922.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/AMDGPU/bf16-conversions.ll b/llvm/test/CodeGen/AMDGPU/bf16-conversions.ll
index 1eb2771618dce0..7108f3d65768cd 100644
--- a/llvm/test/CodeGen/AMDGPU/bf16-conversions.ll
+++ b/llvm/test/CodeGen/AMDGPU/bf16-conversions.ll
@@ -2,6 +2,7 @@
; RUN: llc -march=amdgcn -mcpu=gfx940 < %s | FileCheck --check-prefixes=GCN %s
; TODO: Add global-isel when it can support bf16
+
define amdgpu_ps float @v_test_cvt_bf16_f32_v(bfloat %v) {
; GCN-LABEL: v_test_cvt_bf16_f32_v:
; GCN: ; %bb.0:
@@ -10,6 +11,7 @@ define amdgpu_ps float @v_test_cvt_bf16_f32_v(bfloat %v) {
%cvt = fpext bfloat %v to float
ret float %cvt
}
+
define amdgpu_ps float @v_test_cvt_bf16_f32_s(bfloat inreg %v) {
; GCN-LABEL: v_test_cvt_bf16_f32_s:
; GCN: ; %bb.0:
@@ -19,6 +21,7 @@ define amdgpu_ps float @v_test_cvt_bf16_f32_s(bfloat inreg %v) {
%cvt = fpext bfloat %v to float
ret float %cvt
}
+
define amdgpu_ps float @v_test_cvt_v2f32_v2bf16_v(<2 x float> %src) {
; GCN-LABEL: v_test_cvt_v2f32_v2bf16_v:
; GCN: ; %bb.0:
@@ -42,6 +45,7 @@ define amdgpu_ps float @v_test_cvt_v2f32_v2bf16_v(<2 x float> %src) {
%cast = bitcast <2 x bfloat> %res to float
ret float %cast
}
+
define amdgpu_ps float @v_test_cvt_v2f32_v2bf16_s(<2 x float> inreg %src) {
; GCN-LABEL: v_test_cvt_v2f32_v2bf16_s:
; GCN: ; %bb.0:
@@ -66,6 +70,7 @@ define amdgpu_ps float @v_test_cvt_v2f32_v2bf16_s(<2 x float> inreg %src) {
%cast = bitcast <2 x bfloat> %res to float
ret float %cast
}
+
define amdgpu_ps float @v_test_cvt_f32_bf16_v(float %src) {
; GCN-LABEL: v_test_cvt_f32_bf16_v:
; GCN: ; %bb.0:
@@ -82,6 +87,7 @@ define amdgpu_ps float @v_test_cvt_f32_bf16_v(float %src) {
%ext = fpext bfloat %trunc to float
ret float %ext
}
+
define amdgpu_ps float @v_test_cvt_v2f64_v2bf16_v(<2 x double> %src) {
; GCN-LABEL: v_test_cvt_v2f64_v2bf16_v:
; GCN: ; %bb.0:
@@ -128,6 +134,7 @@ define amdgpu_ps float @v_test_cvt_v2f64_v2bf16_v(<2 x double> %src) {
%cast = bitcast <2 x bfloat> %res to float
ret float %cast
}
+
define amdgpu_ps float @fptrunc_f32_f32_to_v2bf16(float %a, float %b) {
; GCN-LABEL: fptrunc_f32_f32_to_v2bf16:
; GCN: ; %bb.0: ; %entry
@@ -155,6 +162,7 @@ entry:
%ret = bitcast <2 x bfloat> %v2.2 to float
ret float %ret
}
+
define amdgpu_ps float @fptrunc_f32_f32_to_v2bf16_mods(float %a, float %b) {
; GCN-LABEL: fptrunc_f32_f32_to_v2bf16_mods:
; GCN: ; %bb.0: ; %entry
@@ -186,6 +194,7 @@ entry:
%ret = bitcast <2 x bfloat> %v2.2 to float
ret float %ret
}
+
define amdgpu_ps void @fptrunc_f32_to_bf16(float %a, ptr %out) {
; GCN-LABEL: fptrunc_f32_to_bf16:
; GCN: ; %bb.0: ; %entry
@@ -205,6 +214,7 @@ entry:
store bfloat %a.cvt, ptr %out
ret void
}
+
define amdgpu_ps void @fptrunc_f32_to_bf16_abs(float %a, ptr %out) {
; GCN-LABEL: fptrunc_f32_to_bf16_abs:
; GCN: ; %bb.0: ; %entry
@@ -226,6 +236,7 @@ entry:
store bfloat %a.cvt, ptr %out
ret void
}
+
define amdgpu_ps void @fptrunc_f32_to_bf16_neg(float %a, ptr %out) {
; GCN-LABEL: fptrunc_f32_to_bf16_neg:
; GCN: ; %bb.0: ; %entry
@@ -247,6 +258,7 @@ entry:
store bfloat %a.cvt, ptr %out
ret void
}
+
define amdgpu_ps void @fptrunc_f64_to_bf16(double %a, ptr %out) {
; GCN-LABEL: fptrunc_f64_to_bf16:
; GCN: ; %bb.0: ; %entry
@@ -276,6 +288,7 @@ entry:
store bfloat %a.cvt, ptr %out
ret void
}
+
define amdgpu_ps void @fptrunc_f64_to_bf16_neg(double %a, ptr %out) {
; GCN-LABEL: fptrunc_f64_to_bf16_neg:
; GCN: ; %bb.0: ; %entry
@@ -307,6 +320,7 @@ entry:
store bfloat %a.cvt, ptr %out
ret void
}
+
define amdgpu_ps void @fptrunc_f64_to_bf16_abs(double %a, ptr %out) {
; GCN-LABEL: fptrunc_f64_to_bf16_abs:
; GCN: ; %bb.0: ; %entry
@@ -341,4 +355,3 @@ entry:
declare float @llvm.fabs.f32(float)
declare double @llvm.fabs.f64(double)
-
|
Sorry for this mess. I missed review comments earlier. |
chencha3
pushed a commit
to chencha3/llvm-project
that referenced
this pull request
Mar 23, 2024
Authored-by: Pravin Jagtap <Pravin.Jagtap@amd.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.