-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[nfc][AMDGPU] Autogenerated assertions applied to fold-imm-copy.mir #135071
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
[nfc][AMDGPU] Autogenerated assertions applied to fold-imm-copy.mir #135071
Conversation
Autogenerated assertions are applied to fold-imm-copy.mir
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-backend-amdgpu Author: None (mssefat) ChangesAutogenerated assertions are applied to fold-imm-copy.mir Full diff: https://github.com/llvm/llvm-project/pull/135071.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir b/llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
index dce11209d0514..300bae7551ca5 100644
--- a/llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
+++ b/llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
@@ -1,14 +1,23 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=amdgcn -run-pass si-fold-operands -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
-# GCN-LABEL: name: fold-imm-copy
-# GCN: V_AND_B32_e32 65535
-
---
name: fold-imm-copy
tracksRegLiveness: true
body: |
bb.0:
liveins: $vgpr0, $sgpr0_sgpr1
+ ; GCN-LABEL: name: fold-imm-copy
+ ; GCN: liveins: $vgpr0, $sgpr0_sgpr1
+ ; GCN-NEXT: {{ $}}
+ ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
+ ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_64 = COPY $sgpr0_sgpr1
+ ; GCN-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY1]], 9, 0
+ ; GCN-NEXT: [[V_LSHLREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHLREV_B32_e64 2, [[COPY]], implicit $exec
+ ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
+ ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE killed [[V_LSHLREV_B32_e64_]], %subreg.sub0, killed [[V_MOV_B32_e32_]], %subreg.sub1
+ ; GCN-NEXT: [[BUFFER_LOAD_DWORD_ADDR64_:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_ADDR64 [[REG_SEQUENCE]], [[S_LOAD_DWORDX4_IMM]], 0, 4, 0, 0, implicit $exec
+ ; GCN-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 65535, [[BUFFER_LOAD_DWORD_ADDR64_]], implicit $exec
%0:vgpr_32 = COPY $vgpr0
%1:sgpr_64 = COPY $sgpr0_sgpr1
%2:sgpr_128 = S_LOAD_DWORDX4_IMM %1, 9, 0
@@ -23,14 +32,19 @@ body: |
...
---
-# GCN-LABEL: name: no_extra_fold_on_same_opnd
# The first XOR needs commuting to fold that immediate operand.
-# GCN: V_XOR_B32_e32 0, %1
-# GCN: V_XOR_B32_e32 %2, %4.sub0
name: no_extra_fold_on_same_opnd
tracksRegLiveness: true
body: |
bb.0:
+ ; GCN-LABEL: name: no_extra_fold_on_same_opnd
+ ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
+ ; GCN-NEXT: [[DEF1:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
+ ; GCN-NEXT: [[DEF2:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
+ ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
+ ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE killed [[DEF]], %subreg.sub0, killed [[V_MOV_B32_e32_]], %subreg.sub1
+ ; GCN-NEXT: [[V_XOR_B32_e32_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e32 0, [[DEF1]], implicit $exec
+ ; GCN-NEXT: [[V_XOR_B32_e32_1:%[0-9]+]]:vgpr_32 = V_XOR_B32_e32 [[DEF2]], [[REG_SEQUENCE]].sub0, implicit $exec
%0:vgpr_32 = IMPLICIT_DEF
%1:vgpr_32 = IMPLICIT_DEF
%2:vgpr_32 = IMPLICIT_DEF
@@ -45,13 +59,14 @@ body: |
# Make sure the subreg index is not reinterpreted when folding
# immediates
#
-# GCN-LABEL: name: clear_subreg_imm_fold{{$}}
-# GCN: %1:sgpr_32 = S_MOV_B32 4294967288
-# GCN: %2:sgpr_32 = S_MOV_B32 4294967295
name: clear_subreg_imm_fold
tracksRegLiveness: true
body: |
bb.0:
+ ; GCN-LABEL: name: clear_subreg_imm_fold
+ ; GCN: [[S_MOV_B32_:%[0-9]+]]:sgpr_32 = S_MOV_B32 4294967288
+ ; GCN-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sgpr_32 = S_MOV_B32 4294967295
+ ; GCN-NEXT: S_ENDPGM 0, implicit [[S_MOV_B32_]], implicit [[S_MOV_B32_1]]
%0:sreg_64 = S_MOV_B64 -8
%1:sgpr_32 = COPY %0.sub0
%2:sgpr_32 = COPY %0.sub1
@@ -59,28 +74,29 @@ body: |
...
-# GCN-LABEL: name: no_fold_imm_into_m0{{$}}
-# GCN: %0:sreg_32 = S_MOV_B32 -8
-# GCN-NEXT: $m0 = COPY %0
-
---
name: no_fold_imm_into_m0
tracksRegLiveness: true
body: |
bb.0:
+ ; GCN-LABEL: name: no_fold_imm_into_m0
+ ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 -8
+ ; GCN-NEXT: $m0 = COPY [[S_MOV_B32_]]
+ ; GCN-NEXT: S_ENDPGM 0, implicit $m0
%0:sreg_32 = S_MOV_B32 -8
$m0 = COPY %0
S_ENDPGM 0, implicit $m0
...
-# GCN-LABEL: name: fold_sgpr_imm_to_vgpr_copy{{$}}
-# GCN: $vgpr0 = V_MOV_B32_e32 -8, implicit $exec
---
name: fold_sgpr_imm_to_vgpr_copy
tracksRegLiveness: true
body: |
bb.0:
+ ; GCN-LABEL: name: fold_sgpr_imm_to_vgpr_copy
+ ; GCN: $vgpr0 = V_MOV_B32_e32 -8, implicit $exec
+ ; GCN-NEXT: S_ENDPGM 0, implicit $vgpr0
%0:sreg_32 = S_MOV_B32 -8
$vgpr0 = COPY %0
S_ENDPGM 0, implicit $vgpr0
@@ -90,16 +106,17 @@ body: |
# The users of $vgpr1 should not be visited for further immediate
# folding.
-# GCN-LABEL: name: no_fold_physreg_users_vgpr{{$}}
-# GCN: $vgpr1 = V_MOV_B32_e32 0, implicit $exec
-# GCN-NEXT: S_NOP 0, implicit-def $vgpr1
-# GCN-NEXT: %2:vgpr_32 = COPY $vgpr1
-# GCN-NEXT: $vgpr2 = COPY %2
---
name: no_fold_physreg_users_vgpr
tracksRegLiveness: true
body: |
bb.0:
+ ; GCN-LABEL: name: no_fold_physreg_users_vgpr
+ ; GCN: $vgpr1 = V_MOV_B32_e32 0, implicit $exec
+ ; GCN-NEXT: S_NOP 0, implicit-def $vgpr1
+ ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr1
+ ; GCN-NEXT: $vgpr2 = COPY [[COPY]]
+ ; GCN-NEXT: S_ENDPGM 0
%0:sreg_32 = S_MOV_B32 0
%1:vgpr_32 = COPY %0
$vgpr1 = COPY %0
|
|
@arsenm Can you please merge? I do not have merge permission. |
|
@mssefat Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
…lvm#135071) Autogenerated assertions are applied to fold-imm-copy.mir
Autogenerated assertions are applied to fold-imm-copy.mir