1 ; RUN: llc -asm-verbose=false < %s -wasm-keep-registers | FileCheck %s
3 ; Test that 128-bit smul.with.overflow assembles as expected.
5 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
6 target triple = "wasm32-unknown-unknown"
8 define i128 @call_muloti4(i128 %a, i128 %b) nounwind {
10 %smul = tail call { i128, i1 } @llvm.smul.with.overflow.i128(i128 %a, i128 %b)
11 %cmp = extractvalue { i128, i1 } %smul, 1
12 %smul.result = extractvalue { i128, i1 } %smul, 0
13 %X = select i1 %cmp, i128 %smul.result, i128 42
17 ; CHECK: call __muloti4, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}{{$}}
19 declare { i128, i1 } @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone