File: vector-align-store-mask.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (36 lines) | stat: -rw-r--r-- 1,352 bytes parent folder | download | duplicates (7)
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
; RUN: llc -march=hexagon -hexagon-hvx-widen=32 < %s | FileCheck %s

target triple = "hexagon"

; Test the the store mask is adjusted for gaps between sections. The
; Vector Combine pass generates masked stores for chunks of 128 bytes.
; The masked store must be shifted if the first store in a section
; is not a multiple of 128 bytes. This test checks that two masks
; are created, and the second mask is used in a masked store.

; CHECK: [[REG:r[0-9]+]] = ##.LCPI0_1
; CHECK: [[VREG1:v[0-9]+]] = vmem([[REG]]+#0)
; CHECK: [[VREG2:v[0-9]+]] = vlalign([[VREG1]],v{{[0-9]+}},r{{[0-9]+}})
; CHECK: [[QREG:q[0-3]+]] = vand([[VREG2]],r{{[0-9]+}})
; CHECK: if ([[QREG]]) vmem({{.*}}) = v{{[0-9]+}}

define dllexport void @f0(i32* %a0) local_unnamed_addr #0 {
b0:
  br label %b1

b1:                                               ; preds = %b1, %b0
  %v0 = or i32 -1, 40
  %v1 = getelementptr inbounds i32, i32* %a0, i32 %v0
  %v2 = bitcast i32* %v1 to <8 x i32>*
  store <8 x i32> undef, <8 x i32>* %v2, align 32
  %v3 = or i32 0, 48
  %v4 = getelementptr inbounds i32, i32* %a0, i32 %v3
  %v5 = bitcast i32* %v4 to <8 x i32>*
  store <8 x i32> undef, <8 x i32>* %v5, align 64
  br i1 undef, label %b2, label %b1

b2:                                               ; preds = %b1
  ret void
}

attributes #0 = { "target-features"="+hvxv66,+hvx-length128b" }