33 lines · plain
1// REQUIRES: arm-emulator2 3// DEFINE: %{entry_point} = entry4// DEFINE: %{compile} = mlir-opt %s -test-lower-to-llvm5// DEFINE: %{run} = %mcr_aarch64_cmd -march=aarch64 -mattr=+sve \6// DEFINE: -e %{entry_point} -entry-point-result=void \7// DEFINE: -shared-libs=%native_mlir_c_runner_utils,%native_mlir_arm_runner_utils8 9// RUN: %{compile} | %{run} | FileCheck %s10 11func.func @entry() {12 // Set the vector length to 256-bit (equivalent to vscale=2).13 // This allows the checks (below) to look at an entire vector.14 %c256 = arith.constant 256 : i3215 func.call @setArmVLBits(%c256) : (i32) -> ()16 func.call @test_deinterleave() : () -> ()17 return18}19 20func.func @test_deinterleave() attributes {no_inline} {21 %step_vector = llvm.intr.stepvector : vector<[4]xi8>22 vector.print %step_vector : vector<[4]xi8>23 // CHECK: ( 0, 1, 2, 3, 4, 5, 6, 7 )24 %v1, %v2 = vector.deinterleave %step_vector : vector<[4]xi8> -> vector<[2]xi8>25 vector.print %v1 : vector<[2]xi8>26 vector.print %v2 : vector<[2]xi8>27 // CHECK: ( 0, 2, 4, 6 )28 // CHECK: ( 1, 3, 5, 7 )29 return30}31 32func.func private @setArmVLBits(%bits : i32)33