1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=ALL
5 define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
6 %ret = mul i16 %arg1, %arg2
10 define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
11 %ret = mul i32 %arg1, %arg2
15 define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
16 %ret = mul i64 %arg1, %arg2
27 - { id: 0, class: gpr }
28 - { id: 1, class: gpr }
29 - { id: 2, class: gpr }
34 ; ALL-LABEL: name: test_mul_i16
35 ; ALL: liveins: $edi, $esi
37 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr16 = COPY $di
38 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr16 = COPY $si
39 ; ALL-NEXT: [[IMUL16rr:%[0-9]+]]:gr16 = IMUL16rr [[COPY]], [[COPY1]], implicit-def dead $eflags
40 ; ALL-NEXT: $ax = COPY [[IMUL16rr]]
41 ; ALL-NEXT: RET 0, implicit $ax
44 %2(s16) = G_MUL %0, %1
55 - { id: 0, class: gpr }
56 - { id: 1, class: gpr }
57 - { id: 2, class: gpr }
62 ; ALL-LABEL: name: test_mul_i32
63 ; ALL: liveins: $edi, $esi
65 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $edi
66 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
67 ; ALL-NEXT: [[IMUL32rr:%[0-9]+]]:gr32 = IMUL32rr [[COPY]], [[COPY1]], implicit-def dead $eflags
68 ; ALL-NEXT: $eax = COPY [[IMUL32rr]]
69 ; ALL-NEXT: RET 0, implicit $eax
72 %2(s32) = G_MUL %0, %1
83 - { id: 0, class: gpr }
84 - { id: 1, class: gpr }
85 - { id: 2, class: gpr }
90 ; ALL-LABEL: name: test_mul_i64
91 ; ALL: liveins: $rdi, $rsi
93 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rdi
94 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rsi
95 ; ALL-NEXT: [[IMUL64rr:%[0-9]+]]:gr64 = IMUL64rr [[COPY]], [[COPY1]], implicit-def dead $eflags
96 ; ALL-NEXT: $rax = COPY [[IMUL64rr]]
97 ; ALL-NEXT: RET 0, implicit $rax
100 %2(s64) = G_MUL %0, %1