• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4--- |
5  define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
6    %ret = mul i16 %arg1, %arg2
7    ret i16 %ret
8  }
9
10  define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
11    %ret = mul i32 %arg1, %arg2
12    ret i32 %ret
13  }
14
15  define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
16    %ret = mul i64 %arg1, %arg2
17    ret i64 %ret
18  }
19
20...
21---
22name:            test_mul_i16
23alignment:       4
24legalized:       true
25regBankSelected: true
26registers:
27  - { id: 0, class: gpr }
28  - { id: 1, class: gpr }
29  - { id: 2, class: gpr }
30body:             |
31  bb.1 (%ir-block.0):
32    liveins: $edi, $esi
33
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
40    %0(s16) = COPY $di
41    %1(s16) = COPY $si
42    %2(s16) = G_MUL %0, %1
43    $ax = COPY %2(s16)
44    RET 0, implicit $ax
45
46...
47---
48name:            test_mul_i32
49alignment:       4
50legalized:       true
51regBankSelected: true
52registers:
53  - { id: 0, class: gpr }
54  - { id: 1, class: gpr }
55  - { id: 2, class: gpr }
56body:             |
57  bb.1 (%ir-block.0):
58    liveins: $edi, $esi
59
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
66    %0(s32) = COPY $edi
67    %1(s32) = COPY $esi
68    %2(s32) = G_MUL %0, %1
69    $eax = COPY %2(s32)
70    RET 0, implicit $eax
71
72...
73---
74name:            test_mul_i64
75alignment:       4
76legalized:       true
77regBankSelected: true
78registers:
79  - { id: 0, class: gpr }
80  - { id: 1, class: gpr }
81  - { id: 2, class: gpr }
82body:             |
83  bb.1 (%ir-block.0):
84    liveins: $rdi, $rsi
85
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
92    %0(s64) = COPY $rdi
93    %1(s64) = COPY $rsi
94    %2(s64) = G_MUL %0, %1
95    $rax = COPY %2(s64)
96    RET 0, implicit $rax
97
98...
99