1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs -o - %s | FileCheck %s
9 ; CHECK-LABEL: name: mul_s64
10 ; CHECK: liveins: $vgpr0_vgpr1
12 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
13 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 12345
14 ; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s64) = G_MUL [[COPY]], [[C]]
15 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[MUL]](s64)
16 %0:_(s64) = COPY $vgpr0_vgpr1
17 %1:_(s64) = G_CONSTANT i64 12345
18 %2:_(s64) = G_MUL %0, %1
19 $vgpr0_vgpr1 = COPY %2
27 ; CHECK-LABEL: name: mul_s64_zext
28 ; CHECK: liveins: $vgpr0
30 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
31 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32)
32 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 12345
33 ; CHECK-NEXT: [[AMDGPU_:%[0-9]+]]:_(s64) = G_AMDGPU_S_MUL_U64_U32 [[ZEXT]], [[C]]
34 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[AMDGPU_]](s64)
35 %0:_(s32) = COPY $vgpr0
37 %2:_(s64) = G_CONSTANT i64 12345
38 %3:_(s64) = G_MUL %1, %2
39 $vgpr0_vgpr1 = COPY %3
47 ; CHECK-LABEL: name: mul_s64_sext
48 ; CHECK: liveins: $vgpr0
50 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
51 ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32)
52 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 12345
53 ; CHECK-NEXT: [[AMDGPU_:%[0-9]+]]:_(s64) = G_AMDGPU_S_MUL_I64_I32 [[SEXT]], [[C]]
54 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[AMDGPU_]](s64)
55 %0:_(s32) = COPY $vgpr0
57 %2:_(s64) = G_CONSTANT i64 12345
58 %3:_(s64) = G_MUL %1, %2
59 $vgpr0_vgpr1 = COPY %3