File: vec_load.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (52 lines) | stat: -rw-r--r-- 2,047 bytes parent folder | download | duplicates (12)
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_llc_test_checks.py
; RUN: llc < %s -mtriple=ve-unknown-unknown -mattr=+vpu | FileCheck %s

declare <512 x float> @llvm.masked.load.v512f32.p0(ptr %0, i32 immarg %1, <512 x i1> %2, <512 x float> %3) #0

; Function Attrs: nounwind
define fastcc <512 x float> @vec_mload_v512f32(ptr %P, <512 x i1> %M) {
; CHECK-LABEL: vec_mload_v512f32:
; CHECK:       # %bb.0:
; CHECK-NEXT:    lea %s1, 256
; CHECK-NEXT:    lvl %s1
; CHECK-NEXT:    vldu %v0, 8, %s0
; CHECK-NEXT:    lea %s0, 4(, %s0)
; CHECK-NEXT:    vldu %v1, 8, %s0
; CHECK-NEXT:    vshf %v0, %v1, %v0, 8
; CHECK-NEXT:    b.l.t (, %s10)
  %r = call <512 x float> @llvm.masked.load.v512f32.p0(ptr %P, i32 16, <512 x i1> %M, <512 x float> undef)
  ret <512 x float> %r
}

; TODO: Packed select legalization
; Function Attrs: nounwind
; define fastcc <512 x float> @vec_mload_pt_v512f32(ptr %P, <512 x float> %PT, <512 x i1> %M) {
;   %r = call <512 x float> @llvm.masked.load.v512f32.p0(ptr %P, i32 16, <512 x i1> %M, <512 x float> %PT)
;   ret <512 x float> %r
; }

declare <512 x i32> @llvm.masked.load.v512i32.p0(ptr %0, i32 immarg %1, <512 x i1> %2, <512 x i32> %3) #0

; Function Attrs: nounwind
define fastcc <512 x i32> @vec_mload_v512i32(ptr %P, <512 x i1> %M) {
; CHECK-LABEL: vec_mload_v512i32:
; CHECK:       # %bb.0:
; CHECK-NEXT:    lea %s1, 256
; CHECK-NEXT:    lvl %s1
; CHECK-NEXT:    vldl.zx %v0, 8, %s0
; CHECK-NEXT:    lea %s0, 4(, %s0)
; CHECK-NEXT:    vldl.zx %v1, 8, %s0
; CHECK-NEXT:    vshf %v0, %v1, %v0, 13
; CHECK-NEXT:    b.l.t (, %s10)
  %r = call <512 x i32> @llvm.masked.load.v512i32.p0(ptr %P, i32 16, <512 x i1> %M, <512 x i32> undef)
  ret <512 x i32> %r
}

; TODO: Packed select legalization
; ; Function Attrs: nounwind
; define fastcc <512 x i32> @vec_mload_pt_v512i32(ptr %P, <512 x i32> %PT, <512 x i1> %M) {
;   %r = call <512 x i32> @llvm.masked.load.v512i32.p0(ptr %P, i32 16, <512 x i1> %M, <512 x i32> %PT)
;   ret <512 x i32> %r
; }

attributes #0 = { argmemonly nounwind readonly willreturn }