1 ; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
2 ; Test that UMULO works correctly on 64-bit operands.
3 target triple = "wasm32-unknown-unknown"
5 ; CHECK-LABEL: _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE:
7 ; Function Attrs: inlinehint
8 define void @"_ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE"(i64, i64) unnamed_addr #0 {
10 %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
11 %3 = extractvalue { i64, i1 } %2, 0
12 store i64 %3, i64* undef
16 ; Function Attrs: nounwind readnone speculatable
17 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1
19 attributes #0 = { inlinehint }
20 attributes #1 = { nounwind readnone speculatable }
23 ; CHECK: call __multi3, $2, $0, $pop0, $1, $pop7
24 ; CHECK: i64.load $0=, 8($2)
25 define i1 @wut(i64, i64) {
27 %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
28 %3 = extractvalue { i64, i1 } %2, 1