1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=m68k-linux | FileCheck %s
4 define i8 @mul255_8(i8 %A) {
5 ; CHECK-LABEL: mul255_8:
6 ; CHECK: .cfi_startproc
8 ; CHECK-NEXT: move.b (7,%sp), %d0
9 ; CHECK-NEXT: neg.b %d0
15 define i16 @mul65535_16(i16 %A) {
16 ; CHECK-LABEL: mul65535_16:
17 ; CHECK: .cfi_startproc
18 ; CHECK-NEXT: ; %bb.0:
19 ; CHECK-NEXT: move.w (6,%sp), %d0
20 ; CHECK-NEXT: neg.w %d0
22 %mul = mul i16 %A, 65535
26 define i32 @mul4294967295_32(i32 %A) {
27 ; CHECK-LABEL: mul4294967295_32:
28 ; CHECK: .cfi_startproc
29 ; CHECK-NEXT: ; %bb.0:
30 ; CHECK-NEXT: move.l (4,%sp), %d0
31 ; CHECK-NEXT: neg.l %d0
33 %mul = mul i32 %A, 4294967295
37 ; NOTE: If returning a 64-bit integer, d0 will be the higher 32-bit!
38 define i64 @mul18446744073709551615_64(i64 %A) {
39 ; CHECK-LABEL: mul18446744073709551615_64:
40 ; CHECK: .cfi_startproc
41 ; CHECK-NEXT: ; %bb.0:
42 ; CHECK-NEXT: move.l (4,%sp), %d0
43 ; CHECK-NEXT: move.l (8,%sp), %d1
44 ; CHECK-NEXT: neg.l %d1
45 ; CHECK-NEXT: negx.l %d0
47 %mul = mul i64 %A, 18446744073709551615