1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
4 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
5 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
9 name: or_s32_sgpr_sgpr_sgpr
12 tracksRegLiveness: true
16 liveins: $sgpr0, $sgpr1, $sgpr2
17 ; GFX8-LABEL: name: or_s32_sgpr_sgpr_sgpr
18 ; GFX8: liveins: $sgpr0, $sgpr1, $sgpr2
20 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
21 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
22 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
23 ; GFX8-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
24 ; GFX8-NEXT: [[S_OR_B32_1:%[0-9]+]]:sreg_32 = S_OR_B32 [[S_OR_B32_]], [[COPY2]], implicit-def dead $scc
25 ; GFX8-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_1]]
27 ; GFX9-LABEL: name: or_s32_sgpr_sgpr_sgpr
28 ; GFX9: liveins: $sgpr0, $sgpr1, $sgpr2
30 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
31 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
32 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
33 ; GFX9-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
34 ; GFX9-NEXT: [[S_OR_B32_1:%[0-9]+]]:sreg_32 = S_OR_B32 [[S_OR_B32_]], [[COPY2]], implicit-def dead $scc
35 ; GFX9-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_1]]
36 %0:sgpr(s32) = COPY $sgpr0
37 %1:sgpr(s32) = COPY $sgpr1
38 %2:sgpr(s32) = COPY $sgpr2
39 %3:sgpr(s32) = G_OR %0, %1
40 %4:sgpr(s32) = G_OR %3, %2
41 S_ENDPGM 0, implicit %4
46 name: or_s32_vgpr_vgpr_vgpr
49 tracksRegLiveness: true
53 liveins: $vgpr0, $vgpr1, $vgpr2
54 ; GFX8-LABEL: name: or_s32_vgpr_vgpr_vgpr
55 ; GFX8: liveins: $vgpr0, $vgpr1, $vgpr2
57 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
58 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
59 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
60 ; GFX8-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[COPY]], [[COPY1]], implicit $exec
61 ; GFX8-NEXT: [[V_OR_B32_e64_1:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[V_OR_B32_e64_]], [[COPY2]], implicit $exec
62 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_OR_B32_e64_1]]
64 ; GFX9-LABEL: name: or_s32_vgpr_vgpr_vgpr
65 ; GFX9: liveins: $vgpr0, $vgpr1, $vgpr2
67 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
69 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
70 ; GFX9-NEXT: [[V_OR3_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR3_B32_e64 [[COPY]], [[COPY1]], [[COPY2]], implicit $exec
71 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_OR3_B32_e64_]]
72 %0:vgpr(s32) = COPY $vgpr0
73 %1:vgpr(s32) = COPY $vgpr1
74 %2:vgpr(s32) = COPY $vgpr2
75 %3:vgpr(s32) = G_OR %0, %1
76 %4:vgpr(s32) = G_OR %3, %2
77 S_ENDPGM 0, implicit %4
82 name: or_s32_vgpr_vgpr_vgpr_multi_use
85 tracksRegLiveness: true
89 liveins: $vgpr0, $vgpr1, $vgpr2
90 ; GFX8-LABEL: name: or_s32_vgpr_vgpr_vgpr_multi_use
91 ; GFX8: liveins: $vgpr0, $vgpr1, $vgpr2
93 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
94 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
95 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
96 ; GFX8-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[COPY]], [[COPY1]], implicit $exec
97 ; GFX8-NEXT: [[V_OR_B32_e64_1:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[V_OR_B32_e64_]], [[COPY2]], implicit $exec
98 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_OR_B32_e64_1]], implicit [[V_OR_B32_e64_]]
100 ; GFX9-LABEL: name: or_s32_vgpr_vgpr_vgpr_multi_use
101 ; GFX9: liveins: $vgpr0, $vgpr1, $vgpr2
103 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
104 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
105 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
106 ; GFX9-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[COPY]], [[COPY1]], implicit $exec
107 ; GFX9-NEXT: [[V_OR_B32_e64_1:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[V_OR_B32_e64_]], [[COPY2]], implicit $exec
108 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_OR_B32_e64_1]], implicit [[V_OR_B32_e64_]]
109 %0:vgpr(s32) = COPY $vgpr0
110 %1:vgpr(s32) = COPY $vgpr1
111 %2:vgpr(s32) = COPY $vgpr2
112 %3:vgpr(s32) = G_OR %0, %1
113 %4:vgpr(s32) = G_OR %3, %2
114 S_ENDPGM 0, implicit %4, implicit %3