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: [[COPY:%[0-9]+]]:gr16 = COPY $di
36 ; ALL: [[COPY1:%[0-9]+]]:gr16 = COPY $si
37 ; ALL: [[IMUL16rr:%[0-9]+]]:gr16 = IMUL16rr [[COPY]], [[COPY1]], implicit-def $eflags
38 ; ALL: $ax = COPY [[IMUL16rr]]
39 ; ALL: RET 0, implicit $ax
42 %2(s16) = G_MUL %0, %1
53 - { id: 0, class: gpr }
54 - { id: 1, class: gpr }
55 - { id: 2, class: gpr }
60 ; ALL-LABEL: name: test_mul_i32
61 ; ALL: [[COPY:%[0-9]+]]:gr32 = COPY $edi
62 ; ALL: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
63 ; ALL: [[IMUL32rr:%[0-9]+]]:gr32 = IMUL32rr [[COPY]], [[COPY1]], implicit-def $eflags
64 ; ALL: $eax = COPY [[IMUL32rr]]
65 ; ALL: RET 0, implicit $eax
68 %2(s32) = G_MUL %0, %1
79 - { id: 0, class: gpr }
80 - { id: 1, class: gpr }
81 - { id: 2, class: gpr }
86 ; ALL-LABEL: name: test_mul_i64
87 ; ALL: [[COPY:%[0-9]+]]:gr64 = COPY $rdi
88 ; ALL: [[COPY1:%[0-9]+]]:gr64 = COPY $rsi
89 ; ALL: [[IMUL64rr:%[0-9]+]]:gr64 = IMUL64rr [[COPY]], [[COPY1]], implicit-def $eflags
90 ; ALL: $rax = COPY [[IMUL64rr]]
91 ; ALL: RET 0, implicit $rax
94 %2(s64) = G_MUL %0, %1