annotate llvm/test/CodeGen/AMDGPU/fold-multiple.mir @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # RUN: llc --mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -run-pass si-fold-operands,si-shrink-instructions %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
2 --- |
anatofuz
parents:
diff changeset
3 define amdgpu_kernel void @test() #0 {
anatofuz
parents:
diff changeset
4 ret void
anatofuz
parents:
diff changeset
5 }
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 attributes #0 = { nounwind }
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 ...
anatofuz
parents:
diff changeset
10 ---
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 # This used to crash / trigger an assertion, because re-scanning the use list
anatofuz
parents:
diff changeset
13 # after constant-folding the definition of %3 lead to the definition of %2
anatofuz
parents:
diff changeset
14 # being processed twice.
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 # CHECK-LABEL: name: test
anatofuz
parents:
diff changeset
17 # CHECK: %2:vgpr_32 = V_LSHLREV_B32_e32 2, killed %0, implicit $exec
anatofuz
parents:
diff changeset
18 # CHECK: %4:vgpr_32 = V_AND_B32_e32 8, killed %2, implicit $exec
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 name: test
anatofuz
parents:
diff changeset
21 tracksRegLiveness: true
anatofuz
parents:
diff changeset
22 registers:
anatofuz
parents:
diff changeset
23 - { id: 0, class: vgpr_32 }
anatofuz
parents:
diff changeset
24 - { id: 1, class: sreg_32 }
anatofuz
parents:
diff changeset
25 - { id: 2, class: vgpr_32 }
anatofuz
parents:
diff changeset
26 - { id: 3, class: sreg_32 }
anatofuz
parents:
diff changeset
27 - { id: 4, class: vgpr_32 }
anatofuz
parents:
diff changeset
28 - { id: 5, class: sgpr_128 }
anatofuz
parents:
diff changeset
29 body: |
anatofuz
parents:
diff changeset
30 bb.0 (%ir-block.0):
anatofuz
parents:
diff changeset
31 %0 = IMPLICIT_DEF
anatofuz
parents:
diff changeset
32 %1 = S_MOV_B32 2
anatofuz
parents:
diff changeset
33 %2 = V_LSHLREV_B32_e64 %1, killed %0, implicit $exec
anatofuz
parents:
diff changeset
34 %3 = S_LSHL_B32 %1, killed %1, implicit-def dead $scc
anatofuz
parents:
diff changeset
35 %4 = V_AND_B32_e64 killed %2, killed %3, implicit $exec
anatofuz
parents:
diff changeset
36 %5 = IMPLICIT_DEF
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
37 BUFFER_STORE_DWORD_OFFSET killed %4, killed %5, 0, 0, 0, 0, 0, implicit $exec
150
anatofuz
parents:
diff changeset
38 S_ENDPGM 0
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 ...