Home | History | Annotate | Download | only in WebAssembly
      1 ; RUN: llc < %s -asm-verbose=false -disable-wasm-explicit-locals | FileCheck %s
      2 ; Test that UMULO works correctly on 64-bit operands.
      3 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
      4 target triple = "wasm32-unknown-unknown"
      5 
      6 ; CHECK-LABEL: _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE:
      7 ; CHECK:     __multi3
      8 ; Function Attrs: inlinehint
      9 define void @"_ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE"(i64, i64) unnamed_addr #0 {
     10 start:
     11   %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
     12   %3 = extractvalue { i64, i1 } %2, 0
     13   store i64 %3, i64* undef
     14   unreachable
     15 }
     16 
     17 ; Function Attrs: nounwind readnone speculatable
     18 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1
     19 
     20 attributes #0 = { inlinehint }
     21 attributes #1 = { nounwind readnone speculatable }
     22 
     23 ; CHECK-LABEL: wut:
     24 ; CHECK: call     __multi3@FUNCTION, $2, $0, $pop0, $1, $pop7
     25 ; CHECK: i64.load $0=, 8($2)
     26 define i1 @wut(i64, i64) {
     27 start:
     28   %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
     29   %3 = extractvalue { i64, i1 } %2, 1
     30   ret i1 %3
     31 }
     32 
     33