brintos

brintos / llvm-project-archived public Read only

0
0
Text · 746 B · 6c1fb1d Raw
24 lines · plain
1; RUN: llc < %s -asm-verbose=false -fast-isel=false -disable-wasm-fallthrough-return-opt | FileCheck %s2 3target triple = "wasm32-unknown-unknown"4 5; This should be treated as a non-splat vector of pow2 divisor, so sdivs will be6; transformed to shrs in DAGCombiner. There will be 4 stores and 3 shrs (For '1'7; entry we don't need a shr).8 9; CHECK-LABEL: vector_sdiv:10; CHECK-DAG:  i32.store11; CHECK-DAG:  i32.shr_u12; CHECK-DAG:  i32.store13; CHECK-DAG:  i32.shr_u14; CHECK-DAG:  i32.store15; CHECK-DAG:  i32.shr_u16; CHECK-DAG:  i32.store17define void @vector_sdiv(ptr %x, ptr readonly %y) {18entry:19  %0 = load <4 x i32>, ptr %y, align 1620  %div = sdiv <4 x i32> %0, <i32 1, i32 4, i32 2, i32 8>21  store <4 x i32> %div, ptr %x, align 1622  ret void23}24