1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX6 %s
5 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
6 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
14 liveins: $sgpr0, $sgpr1
16 ; GFX6-LABEL: name: smulh_s32_ss
17 ; GFX6: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
18 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
19 ; GFX6: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
20 ; GFX6: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY2]]
21 ; GFX9-LABEL: name: smulh_s32_ss
22 ; GFX9: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
23 ; GFX9: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
24 ; GFX9: [[SMULH:%[0-9]+]]:sgpr(s32) = G_SMULH [[COPY]], [[COPY1]]
25 %0:_(s32) = COPY $sgpr0
26 %1:_(s32) = COPY $sgpr1
27 %2:_(s32) = G_SMULH %0, %1
36 liveins: $sgpr0, $vgpr0
38 ; GFX6-LABEL: name: smulh_s32_sv
39 ; GFX6: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
40 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
41 ; GFX6: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY1]]
42 ; GFX9-LABEL: name: smulh_s32_sv
43 ; GFX9: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
44 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
45 ; GFX9: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY1]]
46 %0:_(s32) = COPY $sgpr0
47 %1:_(s32) = COPY $vgpr0
48 %2:_(s32) = G_SMULH %0, %1
57 liveins: $sgpr0, $vgpr0
59 ; GFX6-LABEL: name: smulh_s32_vs
60 ; GFX6: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
61 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
62 ; GFX6: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
63 ; GFX6: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY2]]
64 ; GFX9-LABEL: name: smulh_s32_vs
65 ; GFX9: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
66 ; GFX9: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
67 ; GFX9: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
68 ; GFX9: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY2]]
69 %0:_(s32) = COPY $vgpr0
70 %1:_(s32) = COPY $sgpr0
71 %2:_(s32) = G_SMULH %0, %1
80 liveins: $vgpr0, $vgpr1
82 ; GFX6-LABEL: name: smulh_s32_vv
83 ; GFX6: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
84 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
85 ; GFX6: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY1]]
86 ; GFX9-LABEL: name: smulh_s32_vv
87 ; GFX9: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
88 ; GFX9: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
89 ; GFX9: [[SMULH:%[0-9]+]]:vgpr(s32) = G_SMULH [[COPY]], [[COPY1]]
90 %0:_(s32) = COPY $vgpr0
91 %1:_(s32) = COPY $vgpr1
92 %2:_(s32) = G_SMULH %0, %1