1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=aarch64-linux-gnu -mattr=+sve | FileCheck %s
4 declare i32 @llvm.experimental.get.vector.length.i16(i16, i32, i1)
5 declare i32 @llvm.experimental.get.vector.length.i32(i32, i32, i1)
6 declare i32 @llvm.experimental.get.vector.length.i64(i64, i32, i1)
8 define i32 @vector_length_i16(i16 zeroext %tc) {
9 ; CHECK-LABEL: vector_length_i16:
12 ; CHECK-NEXT: cmp w0, w8
13 ; CHECK-NEXT: csel w0, w0, w8, lo
15 %a = call i32 @llvm.experimental.get.vector.length.i16(i16 %tc, i32 2, i1 true)
19 define i32 @vector_length_i32(i32 zeroext %tc) {
20 ; CHECK-LABEL: vector_length_i32:
23 ; CHECK-NEXT: cmp w0, w8
24 ; CHECK-NEXT: csel w0, w0, w8, lo
26 %a = call i32 @llvm.experimental.get.vector.length.i32(i32 %tc, i32 2, i1 true)
30 define i32 @vector_length_i64(i64 %tc) {
31 ; CHECK-LABEL: vector_length_i64:
34 ; CHECK-NEXT: cmp x0, x8
35 ; CHECK-NEXT: csel x0, x0, x8, lo
36 ; CHECK-NEXT: // kill: def $w0 killed $w0 killed $x0
38 %a = call i32 @llvm.experimental.get.vector.length.i64(i64 %tc, i32 2, i1 true)