1 ; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
3 ; Test that integer div and rem by constant are optimized appropriately.
5 target triple = "wasm32-unknown-unknown"
7 ; CHECK-LABEL: test_udiv_2:
9 define i32 @test_udiv_2(i32 %x) {
14 ; CHECK-LABEL: test_udiv_5:
16 define i32 @test_udiv_5(i32 %x) {
21 ; CHECK-LABEL: test_sdiv_2:
23 define i32 @test_sdiv_2(i32 %x) {
28 ; CHECK-LABEL: test_sdiv_5:
30 define i32 @test_sdiv_5(i32 %x) {
35 ; CHECK-LABEL: test_urem_2:
37 define i32 @test_urem_2(i32 %x) {
42 ; CHECK-LABEL: test_urem_5:
44 define i32 @test_urem_5(i32 %x) {
49 ; CHECK-LABEL: test_srem_2:
51 define i32 @test_srem_2(i32 %x) {
56 ; CHECK-LABEL: test_srem_5:
58 define i32 @test_srem_5(i32 %x) {