• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X64
3
4;TODO: instruction selection not supported yet
5;define i8 @test_mul_i8(i8 %arg1, i8 %arg2) {
6;  %ret = mul i8 %arg1, %arg2
7;  ret i8 %ret
8;}
9
10define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
11; X64-LABEL: test_mul_i16:
12; X64:       # %bb.0:
13; X64-NEXT:    movl %esi, %eax
14; X64-NEXT:    imulw %di, %ax
15; X64-NEXT:    # kill: def $ax killed $ax killed $eax
16; X64-NEXT:    retq
17  %ret = mul i16 %arg1, %arg2
18  ret i16 %ret
19}
20
21define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
22; X64-LABEL: test_mul_i32:
23; X64:       # %bb.0:
24; X64-NEXT:    movl %esi, %eax
25; X64-NEXT:    imull %edi, %eax
26; X64-NEXT:    retq
27  %ret = mul i32 %arg1, %arg2
28  ret i32 %ret
29}
30
31define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
32; X64-LABEL: test_mul_i64:
33; X64:       # %bb.0:
34; X64-NEXT:    movq %rsi, %rax
35; X64-NEXT:    imulq %rdi, %rax
36; X64-NEXT:    retq
37  %ret = mul i64 %arg1, %arg2
38  ret i64 %ret
39}
40
41