1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -O0 -mtriple=aarch64-linux-gnu -global-isel -stop-after=irtranslator %s -o - | FileCheck %s
4 define i64 @call_vscale_i64() {
5 ; CHECK-LABEL: name: call_vscale_i64
7 ; CHECK-NEXT: [[VSCALE:%[0-9]+]]:_(s64) = G_VSCALE i64 1
8 ; CHECK-NEXT: $x0 = COPY [[VSCALE]](s64)
9 ; CHECK-NEXT: RET_ReallyLR implicit $x0
11 %vscale = call i64 @llvm.vscale.64()
15 define i64 @call_vscale_i32() {
16 ; CHECK-LABEL: name: call_vscale_i32
18 ; CHECK-NEXT: [[VSCALE:%[0-9]+]]:_(s32) = G_VSCALE i32 1
19 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s32)
20 ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)
21 ; CHECK-NEXT: RET_ReallyLR implicit $x0
23 %vscale = call i32 @llvm.vscale.32()
24 %zext = zext i32 %vscale to i64
28 define i64 @call_vscale_i16() {
29 ; CHECK-LABEL: name: call_vscale_i16
31 ; CHECK-NEXT: [[VSCALE:%[0-9]+]]:_(s16) = G_VSCALE i16 1
32 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s16)
33 ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)
34 ; CHECK-NEXT: RET_ReallyLR implicit $x0
36 %vscale = call i16 @llvm.vscale.16()
37 %zext = zext i16 %vscale to i64
41 define i64 @call_vscale_i8() {
42 ; CHECK-LABEL: name: call_vscale_i8
44 ; CHECK-NEXT: [[VSCALE:%[0-9]+]]:_(s8) = G_VSCALE i8 1
45 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s8)
46 ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)
47 ; CHECK-NEXT: RET_ReallyLR implicit $x0
49 %vscale = call i8 @llvm.vscale.8()
50 %zext = zext i8 %vscale to i64