xref: /llvm-project/llvm/test/CodeGen/AArch64/madd-lohi.ll (revision adec9223616477df023026b0269ccd008701cc94)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=arm64-apple-ios7.0 %s -o - | FileCheck %s
3; RUN: llc -mtriple=aarch64_be-linux-gnu %s -o - | FileCheck --check-prefix=CHECK-BE %s
4
5define i128 @test_128bitmul(i128 %lhs, i128 %rhs) {
6; CHECK-LABEL: test_128bitmul:
7; CHECK:       ; %bb.0:
8; CHECK-NEXT:    umulh x8, x0, x2
9; CHECK-NEXT:    madd x8, x0, x3, x8
10; CHECK-NEXT:    mul x0, x0, x2
11; CHECK-NEXT:    madd x1, x1, x2, x8
12; CHECK-NEXT:    ret
13;
14; CHECK-BE-LABEL: test_128bitmul:
15; CHECK-BE:       // %bb.0:
16; CHECK-BE-NEXT:    umulh x8, x1, x3
17; CHECK-BE-NEXT:    madd x8, x1, x2, x8
18; CHECK-BE-NEXT:    mul x1, x1, x3
19; CHECK-BE-NEXT:    madd x0, x0, x3, x8
20; CHECK-BE-NEXT:    ret
21
22
23  %prod = mul i128 %lhs, %rhs
24  ret i128 %prod
25}
26