1; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s 2 3; Test that the frem instruction works. 4 5target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" 6target triple = "wasm32-unknown-unknown" 7 8; CHECK-LABEL: frem32: 9; CHECK-NEXT: .functype frem32 (f32, f32) -> (f32){{$}} 10; CHECK-NEXT: {{^}} call $push0=, fmodf, $0, $1{{$}} 11; CHECK-NEXT: return $pop0{{$}} 12define float @frem32(float %x, float %y) { 13 %a = frem float %x, %y 14 ret float %a 15} 16 17; CHECK-LABEL: frem64: 18; CHECK-NEXT: .functype frem64 (f64, f64) -> (f64){{$}} 19; CHECK-NEXT: {{^}} call $push0=, fmod, $0, $1{{$}} 20; CHECK-NEXT: return $pop0{{$}} 21define double @frem64(double %x, double %y) { 22 %a = frem double %x, %y 23 ret double %a 24} 25