1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s
5 define void @test_mul_i1() { ret void}
7 define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
8 %ret = mul i16 %arg1, %arg2
12 define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
13 %ret = mul i32 %arg1, %arg2
17 define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
18 %ret = mul i64 %arg1, %arg2
27 regBankSelected: false
29 - { id: 0, class: _, preferred-register: '' }
30 - { id: 1, class: _, preferred-register: '' }
31 - { id: 2, class: _, preferred-register: '' }
35 ; CHECK-LABEL: name: test_mul_i1
36 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edx
37 ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
38 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
39 ; CHECK: [[MUL:%[0-9]+]]:_(s8) = G_MUL [[TRUNC]], [[TRUNC1]]
40 ; CHECK: [[DEF:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF
41 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1
42 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[MUL]](s8)
43 ; CHECK: [[AND:%[0-9]+]]:_(s8) = G_AND [[COPY1]], [[C]]
44 ; CHECK: G_STORE [[AND]](s8), [[DEF]](p0) :: (store 1)
47 %1(s1) = G_TRUNC %0(s32)
49 %3:_(p0) = G_IMPLICIT_DEF
50 G_STORE %2, %3 :: (store 1)
57 regBankSelected: false
66 ; CHECK-LABEL: name: test_mul_i16
67 ; CHECK: [[COPY:%[0-9]+]]:_(s16) = COPY $di
68 ; CHECK: [[COPY1:%[0-9]+]]:_(s16) = COPY $si
69 ; CHECK: [[MUL:%[0-9]+]]:_(s16) = G_MUL [[COPY]], [[COPY1]]
70 ; CHECK: $ax = COPY [[MUL]](s16)
71 ; CHECK: RET 0, implicit $ax
74 %2(s16) = G_MUL %0, %1
83 regBankSelected: false
92 ; CHECK-LABEL: name: test_mul_i32
93 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi
94 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi
95 ; CHECK: [[MUL:%[0-9]+]]:_(s32) = G_MUL [[COPY]], [[COPY1]]
96 ; CHECK: $eax = COPY [[MUL]](s32)
97 ; CHECK: RET 0, implicit $eax
100 %2(s32) = G_MUL %0, %1
109 regBankSelected: false
111 - { id: 0, class: _ }
112 - { id: 1, class: _ }
113 - { id: 2, class: _ }
118 ; CHECK-LABEL: name: test_mul_i64
119 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $rdi
120 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $rsi
121 ; CHECK: [[MUL:%[0-9]+]]:_(s64) = G_MUL [[COPY]], [[COPY1]]
122 ; CHECK: $rax = COPY [[MUL]](s64)
123 ; CHECK: RET 0, implicit $rax
126 %2(s64) = G_MUL %0, %1