-
Notifications
You must be signed in to change notification settings - Fork 15.4k
AMDGPU: Fix broken check lines in test #154690
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
Merged
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/fix-broken-checks-fsqrt-f64-test
Aug 21, 2025
Merged
AMDGPU: Fix broken check lines in test #154690
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/fix-broken-checks-fsqrt-f64-test
Aug 21, 2025
Conversation
This file contains hidden or 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
SelectionDAG checks were dropped, regenerate the test to restore them.
Member
|
@llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesSelectionDAG checks were dropped, regenerate the test to Patch is 240.92 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/154690.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/AMDGPU/fsqrt.f64.ll b/llvm/test/CodeGen/AMDGPU/fsqrt.f64.ll
index 8f3b9a5006fc4..cffa287dd91f5 100644
--- a/llvm/test/CodeGen/AMDGPU/fsqrt.f64.ll
+++ b/llvm/test/CodeGen/AMDGPU/fsqrt.f64.ll
@@ -1,136 +1,472 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=pitcairn < %s | FileCheck -check-prefixes=SDAG %s
-; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=SDAG %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=pitcairn < %s | FileCheck -check-prefixes=GFX6,GFX6-SDAG %s
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=GFX8,GFX8-SDAG %s
-; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=pitcairn < %s | FileCheck -check-prefixes=GISEL %s
-; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=GISEL %s
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=pitcairn < %s | FileCheck -check-prefixes=GFX6,GFX6-GISEL %s
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=GFX8,GFX8-GISEL %s
define double @v_sqrt_f64(double %x) {
-; GISEL-LABEL: v_sqrt_f64:
-; GISEL: ; %bb.0:
-; GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GISEL-NEXT: v_mov_b32_e32 v2, 0
-; GISEL-NEXT: v_bfrev_b32_e32 v3, 8
-; GISEL-NEXT: v_cmp_lt_f64_e32 vcc, v[0:1], v[2:3]
-; GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
-; GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
-; GISEL-NEXT: v_ldexp_f64 v[0:1], v[0:1], v2
-; GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
-; GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
-; GISEL-NEXT: v_mov_b32_e32 v5, 0x260
-; GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
-; GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
-; GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
-; GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
-; GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
-; GISEL-NEXT: s_setpc_b64 s[30:31]
+; GFX6-SDAG-LABEL: v_sqrt_f64:
+; GFX6-SDAG: ; %bb.0:
+; GFX6-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX6-SDAG-NEXT: s_brev_b32 s5, 8
+; GFX6-SDAG-NEXT: v_cmp_gt_f64_e32 vcc, s[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[0:1], v[0:1], v2
+; GFX6-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX6-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX6-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX6-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX6-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX8-SDAG-LABEL: v_sqrt_f64:
+; GFX8-SDAG: ; %bb.0:
+; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX8-SDAG-NEXT: s_brev_b32 s5, 8
+; GFX8-SDAG-NEXT: v_cmp_gt_f64_e32 vcc, s[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[0:1], v[0:1], v2
+; GFX8-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX8-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX8-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX8-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX6-GISEL-LABEL: v_sqrt_f64:
+; GFX6-GISEL: ; %bb.0:
+; GFX6-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v2, 0
+; GFX6-GISEL-NEXT: v_bfrev_b32_e32 v3, 8
+; GFX6-GISEL-NEXT: v_cmp_lt_f64_e32 vcc, v[0:1], v[2:3]
+; GFX6-GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
+; GFX6-GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
+; GFX6-GISEL-NEXT: v_ldexp_f64 v[0:1], v[0:1], v2
+; GFX6-GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
+; GFX6-GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX6-GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX6-GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX6-GISEL-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX8-GISEL-LABEL: v_sqrt_f64:
+; GFX8-GISEL: ; %bb.0:
+; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-GISEL-NEXT: v_bfrev_b32_e32 v3, 8
+; GFX8-GISEL-NEXT: v_cmp_lt_f64_e32 vcc, v[0:1], v[2:3]
+; GFX8-GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
+; GFX8-GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
+; GFX8-GISEL-NEXT: v_ldexp_f64 v[0:1], v[0:1], v2
+; GFX8-GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
+; GFX8-GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX8-GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX8-GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]
%result = call double @llvm.sqrt.f64(double %x)
ret double %result
}
define double @v_sqrt_f64_fneg(double %x) {
-; GISEL-LABEL: v_sqrt_f64_fneg:
-; GISEL: ; %bb.0:
-; GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GISEL-NEXT: v_mov_b32_e32 v2, 0
-; GISEL-NEXT: v_bfrev_b32_e32 v3, 8
-; GISEL-NEXT: v_cmp_lt_f64_e64 vcc, -v[0:1], v[2:3]
-; GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
-; GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
-; GISEL-NEXT: v_ldexp_f64 v[0:1], -v[0:1], v2
-; GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
-; GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
-; GISEL-NEXT: v_mov_b32_e32 v5, 0x260
-; GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
-; GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
-; GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
-; GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
-; GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
-; GISEL-NEXT: s_setpc_b64 s[30:31]
+; GFX6-SDAG-LABEL: v_sqrt_f64_fneg:
+; GFX6-SDAG: ; %bb.0:
+; GFX6-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX6-SDAG-NEXT: s_brev_b32 s5, 9
+; GFX6-SDAG-NEXT: v_cmp_lt_f64_e32 vcc, s[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[0:1], -v[0:1], v2
+; GFX6-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX6-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX6-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX6-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX6-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX8-SDAG-LABEL: v_sqrt_f64_fneg:
+; GFX8-SDAG: ; %bb.0:
+; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX8-SDAG-NEXT: s_brev_b32 s5, 9
+; GFX8-SDAG-NEXT: v_cmp_lt_f64_e32 vcc, s[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[0:1], -v[0:1], v2
+; GFX8-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX8-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX8-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX8-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX6-GISEL-LABEL: v_sqrt_f64_fneg:
+; GFX6-GISEL: ; %bb.0:
+; GFX6-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v2, 0
+; GFX6-GISEL-NEXT: v_bfrev_b32_e32 v3, 8
+; GFX6-GISEL-NEXT: v_cmp_lt_f64_e64 vcc, -v[0:1], v[2:3]
+; GFX6-GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
+; GFX6-GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
+; GFX6-GISEL-NEXT: v_ldexp_f64 v[0:1], -v[0:1], v2
+; GFX6-GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
+; GFX6-GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX6-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX6-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX6-GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX6-GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX6-GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX6-GISEL-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX8-GISEL-LABEL: v_sqrt_f64_fneg:
+; GFX8-GISEL: ; %bb.0:
+; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-GISEL-NEXT: v_bfrev_b32_e32 v3, 8
+; GFX8-GISEL-NEXT: v_cmp_lt_f64_e64 vcc, -v[0:1], v[2:3]
+; GFX8-GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
+; GFX8-GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
+; GFX8-GISEL-NEXT: v_ldexp_f64 v[0:1], -v[0:1], v2
+; GFX8-GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
+; GFX8-GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX8-GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
+; GFX8-GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX8-GISEL-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX8-GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX8-GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX8-GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]
%x.neg = fneg double %x
%result = call double @llvm.sqrt.f64(double %x.neg)
ret double %result
}
define double @v_sqrt_f64_fabs(double %x) {
-; GISEL-LABEL: v_sqrt_f64_fabs:
-; GISEL: ; %bb.0:
-; GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GISEL-NEXT: v_mov_b32_e32 v2, 0
-; GISEL-NEXT: v_bfrev_b32_e32 v3, 8
-; GISEL-NEXT: v_cmp_lt_f64_e64 vcc, |v[0:1]|, v[2:3]
-; GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
-; GISEL-NEXT: v_lshlrev_b32_e32 v2, 8, v2
-; GISEL-NEXT: v_ldexp_f64 v[0:1], |v[0:1]|, v2
-; GISEL-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
-; GISEL-NEXT: v_mul_f64 v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_mul_f64 v[2:3], v[0:1], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[4:5], v[2:3], 0.5
-; GISEL-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_fma_f64 v[6:7], -v[2:3], v[2:3], v[0:1]
-; GISEL-NEXT: v_fma_f64 v[2:3], v[6:7], v[4:5], v[2:3]
-; GISEL-NEXT: v_mov_b32_e32 v4, 0xffffff80
-; GISEL-NEXT: v_mov_b32_e32 v5, 0x260
-; GISEL-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
-; GISEL-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
-; GISEL-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
-; GISEL-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
-; GISEL-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
-; GISEL-NEXT: s_setpc_b64 s[30:31]
+; GFX6-SDAG-LABEL: v_sqrt_f64_fabs:
+; GFX6-SDAG: ; %bb.0:
+; GFX6-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX6-SDAG-NEXT: s_brev_b32 s5, 8
+; GFX6-SDAG-NEXT: v_cmp_lt_f64_e64 vcc, |v[0:1]|, s[4:5]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[0:1], |v[0:1]|, v2
+; GFX6-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX6-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX6-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX6-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX6-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX6-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX6-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX6-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX6-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX8-SDAG-LABEL: v_sqrt_f64_fabs:
+; GFX8-SDAG: ; %bb.0:
+; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-SDAG-NEXT: s_mov_b32 s4, 0
+; GFX8-SDAG-NEXT: s_brev_b32 s5, 8
+; GFX8-SDAG-NEXT: v_cmp_lt_f64_e64 vcc, |v[0:1]|, s[4:5]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v2, 0x100
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v2, 0, v2, vcc
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[0:1], |v[0:1]|, v2
+; GFX8-SDAG-NEXT: v_rsq_f64_e32 v[2:3], v[0:1]
+; GFX8-SDAG-NEXT: v_mul_f64 v[4:5], v[0:1], v[2:3]
+; GFX8-SDAG-NEXT: v_mul_f64 v[2:3], v[2:3], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[2:3], v[4:5], 0.5
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[4:5], v[6:7], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[2:3], v[6:7], v[2:3]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[4:5], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_fma_f64 v[6:7], -v[4:5], v[4:5], v[0:1]
+; GFX8-SDAG-NEXT: v_fma_f64 v[2:3], v[6:7], v[2:3], v[4:5]
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v4, 0xffffff80
+; GFX8-SDAG-NEXT: v_mov_b32_e32 v5, 0x260
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v4, 0, v4, vcc
+; GFX8-SDAG-NEXT: v_cmp_class_f64_e32 vcc, v[0:1], v5
+; GFX8-SDAG-NEXT: v_ldexp_f64 v[2:3], v[2:3], v4
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
+; GFX8-SDAG-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
+; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]
+;
+; GFX6-GISEL-LABEL: v_sqrt_f64_fabs:
+; GFX6-GISEL: ; %bb.0:
+; GFX6-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX6-GISEL-NEXT: v_mov_b32_e32 v2, 0
+; GFX6-GISEL-NEXT: v_bfrev_b32_e32 v3, 8
+; GFX6-GISEL-NEXT: v_cmp_lt_f64_e64 vcc, |v[0:1]|, v[2:3]
+; GFX6-GISEL-NEXT: v_cndmask_b32_e64 v2, 0, 1, vcc
+; GFX6-GISEL-NEXT: v_lshlrev_b32_e32...
[truncated]
|
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.

SelectionDAG checks were dropped, regenerate the test to
restore them.