File: irtranslator-vscale.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (52 lines) | stat: -rw-r--r-- 1,708 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
; RUN: llc -O0 -mtriple=aarch64-linux-gnu -global-isel -stop-after=irtranslator %s -o - | FileCheck %s

define i64 @call_vscale_i64() {
  ; CHECK-LABEL: name: call_vscale_i64
  ; CHECK: bb.1.entry:
  ; CHECK-NEXT:   [[VSCALE:%[0-9]+]]:_(s64) = G_VSCALE i64 1
  ; CHECK-NEXT:   $x0 = COPY [[VSCALE]](s64)
  ; CHECK-NEXT:   RET_ReallyLR implicit $x0
entry:
  %vscale = call i64 @llvm.vscale.64()
  ret i64 %vscale
}

define i64 @call_vscale_i32() {
  ; CHECK-LABEL: name: call_vscale_i32
  ; CHECK: bb.1.entry:
  ; CHECK-NEXT:   [[VSCALE:%[0-9]+]]:_(s32) = G_VSCALE i32 1
  ; CHECK-NEXT:   [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s32)
  ; CHECK-NEXT:   $x0 = COPY [[ZEXT]](s64)
  ; CHECK-NEXT:   RET_ReallyLR implicit $x0
entry:
  %vscale = call i32 @llvm.vscale.32()
  %zext = zext i32 %vscale to i64
  ret i64 %zext
}

define i64 @call_vscale_i16() {
  ; CHECK-LABEL: name: call_vscale_i16
  ; CHECK: bb.1.entry:
  ; CHECK-NEXT:   [[VSCALE:%[0-9]+]]:_(s16) = G_VSCALE i16 1
  ; CHECK-NEXT:   [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s16)
  ; CHECK-NEXT:   $x0 = COPY [[ZEXT]](s64)
  ; CHECK-NEXT:   RET_ReallyLR implicit $x0
entry:
  %vscale = call i16 @llvm.vscale.16()
  %zext = zext i16 %vscale to i64
  ret i64 %zext
}

define i64 @call_vscale_i8() {
  ; CHECK-LABEL: name: call_vscale_i8
  ; CHECK: bb.1.entry:
  ; CHECK-NEXT:   [[VSCALE:%[0-9]+]]:_(s8) = G_VSCALE i8 1
  ; CHECK-NEXT:   [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[VSCALE]](s8)
  ; CHECK-NEXT:   $x0 = COPY [[ZEXT]](s64)
  ; CHECK-NEXT:   RET_ReallyLR implicit $x0
entry:
  %vscale = call i8 @llvm.vscale.8()
  %zext = zext i8 %vscale to i64
  ret i64 %zext
}