brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 85b6bd2 Raw
59 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s3; Test that UMULO works correctly on 64-bit operands.4target triple = "wasm32-unknown-unknown"5 6; Function Attrs: inlinehint7define void @"_ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE"(i64, i64) unnamed_addr #0 {8; CHECK-LABEL: _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE:9; CHECK:         .functype _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE (i64, i64) -> ()10; CHECK-NEXT:  # %bb.0: # %start11; CHECK-NEXT:    global.get $push2=, __stack_pointer12; CHECK-NEXT:    i32.const $push3=, 1613; CHECK-NEXT:    i32.sub $push6=, $pop2, $pop314; CHECK-NEXT:    local.tee $push5=, $2=, $pop615; CHECK-NEXT:    global.set __stack_pointer, $pop516; CHECK-NEXT:    i64.const $push0=, 017; CHECK-NEXT:    i64.const $push4=, 018; CHECK-NEXT:    call __multi3, $2, $0, $pop0, $1, $pop419; CHECK-NEXT:    i64.load $push1=, 0($2)20; CHECK-NEXT:    i64.store 0($2), $pop121; CHECK-NEXT:    unreachable22start:23  %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)24  %3 = extractvalue { i64, i1 } %2, 025  store i64 %3, ptr undef26  unreachable27}28 29; Function Attrs: nounwind readnone speculatable30declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #131 32attributes #0 = { inlinehint }33attributes #1 = { nounwind readnone speculatable }34 35define i1 @wut(i64, i64) {36; CHECK-LABEL: wut:37; CHECK:         .functype wut (i64, i64) -> (i32)38; CHECK-NEXT:  # %bb.0: # %start39; CHECK-NEXT:    global.get $push2=, __stack_pointer40; CHECK-NEXT:    i32.const $push3=, 1641; CHECK-NEXT:    i32.sub $push9=, $pop2, $pop342; CHECK-NEXT:    local.tee $push8=, $2=, $pop943; CHECK-NEXT:    global.set __stack_pointer, $pop844; CHECK-NEXT:    i64.const $push0=, 045; CHECK-NEXT:    i64.const $push7=, 046; CHECK-NEXT:    call __multi3, $2, $0, $pop0, $1, $pop747; CHECK-NEXT:    i64.load $1=, 8($2)48; CHECK-NEXT:    i32.const $push4=, 1649; CHECK-NEXT:    i32.add $push5=, $2, $pop450; CHECK-NEXT:    global.set __stack_pointer, $pop551; CHECK-NEXT:    i64.const $push6=, 052; CHECK-NEXT:    i64.ne $push1=, $1, $pop653; CHECK-NEXT:    # fallthrough-return54start:55  %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)56  %3 = extractvalue { i64, i1 } %2, 157  ret i1 %358}59