File: irtranslator-vscale.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,696 kB
  • sloc: cpp: 7,438,781; ansic: 1,393,871; asm: 1,012,926; python: 241,771; f90: 86,635; objc: 75,411; lisp: 42,144; pascal: 17,286; sh: 8,596; ml: 5,082; perl: 4,730; makefile: 3,591; awk: 3,523; javascript: 2,251; xml: 892; fortran: 672
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
}