[llvm] 06019e3 - AMDGPU: Add missing test for s_denorm_mode scheduling
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 08:07:44 PDT 2020
Author: Matt Arsenault
Date: 2020-05-28T11:07:22-04:00
New Revision: 06019e312571c886494d3287e8962e5d5943dab8
URL: https://github.com/llvm/llvm-project/commit/06019e312571c886494d3287e8962e5d5943dab8
DIFF: https://github.com/llvm/llvm-project/commit/06019e312571c886494d3287e8962e5d5943dab8.diff
LOG: AMDGPU: Add missing test for s_denorm_mode scheduling
Forgot to add this file to 1a9e0d7092145e33175f628f4cdd28acf0d17100
Added:
llvm/test/CodeGen/AMDGPU/schedule-barrier-fpmode.mir
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/schedule-barrier-fpmode.mir b/llvm/test/CodeGen/AMDGPU/schedule-barrier-fpmode.mir
new file mode 100644
index 000000000000..117e6f588162
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/schedule-barrier-fpmode.mir
@@ -0,0 +1,99 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=machine-scheduler -o - %s | FileCheck %s
+# Make sure FP mode is not a hard scheduling boundary
+
+---
+name: denorm_mode_not_barrier
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1
+
+ ; CHECK-LABEL: name: denorm_mode_not_barrier
+ ; CHECK: liveins: $vgpr0_vgpr1
+ ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
+ ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
+ ; CHECK: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
+ ; CHECK: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
+ %0:vreg_64 = COPY $vgpr0_vgpr1
+ %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec :: (load 4)
+ S_DENORM_MODE 0, implicit-def $mode, implicit $mode
+ %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec :: (load 4)
+ %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
+ S_ENDPGM 0, implicit %3
+...
+
+---
+name: round_mode_not_barrier
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1
+
+ ; CHECK-LABEL: name: round_mode_not_barrier
+ ; CHECK: liveins: $vgpr0_vgpr1
+ ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
+ ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
+ ; CHECK: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
+ ; CHECK: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
+ %0:vreg_64 = COPY $vgpr0_vgpr1
+ %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec :: (load 4)
+ S_ROUND_MODE 0, implicit-def $mode, implicit $mode
+ %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec :: (load 4)
+ %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
+ S_ENDPGM 0, implicit %3
+...
+
+---
+name: denorm_mode_mode_def_use
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1
+
+ ; CHECK-LABEL: name: denorm_mode_mode_def_use
+ ; CHECK: liveins: $vgpr0_vgpr1
+ ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
+ ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: dead %3:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
+ ; CHECK: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
+ ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
+ ; CHECK: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
+ %0:vreg_64 = COPY $vgpr0_vgpr1
+ %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec :: (load 4)
+ S_DENORM_MODE 0, implicit-def $mode, implicit $mode
+ %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
+ %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec :: (load 4)
+ %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
+ S_ENDPGM 0, implicit %2, implicit %4
+...
+
+---
+name: round_mode_mode_def_use
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1
+
+ ; CHECK-LABEL: name: round_mode_mode_def_use
+ ; CHECK: liveins: $vgpr0_vgpr1
+ ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
+ ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: dead %3:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, 0, 0, implicit $exec :: (load 4)
+ ; CHECK: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
+ ; CHECK: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
+ ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
+ ; CHECK: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
+ %0:vreg_64 = COPY $vgpr0_vgpr1
+ %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec :: (load 4)
+ S_ROUND_MODE 0, implicit-def $mode, implicit $mode
+ %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
+ %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec :: (load 4)
+ %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
+ S_ENDPGM 0, implicit %2, implicit %4
+...
More information about the llvm-commits
mailing list