• 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=ALL --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:    imulw %di, %si
14; X64-NEXT:    movl %esi, %eax
15; X64-NEXT:    retq
16  %ret = mul i16 %arg1, %arg2
17  ret i16 %ret
18}
19
20define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
21; X64-LABEL: test_mul_i32:
22; X64:       # %bb.0:
23; X64-NEXT:    imull %edi, %esi
24; X64-NEXT:    movl %esi, %eax
25; X64-NEXT:    retq
26  %ret = mul i32 %arg1, %arg2
27  ret i32 %ret
28}
29
30define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
31; X64-LABEL: test_mul_i64:
32; X64:       # %bb.0:
33; X64-NEXT:    imulq %rdi, %rsi
34; X64-NEXT:    movq %rsi, %rax
35; X64-NEXT:    retq
36  %ret = mul i64 %arg1, %arg2
37  ret i64 %ret
38}
39
40