File: stack-coloring-scalablevec.mir

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 (39 lines) | stat: -rw-r--r-- 1,172 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
# RUN: llc -mtriple riscv64 -mattr=+m,+v -run-pass=stack-coloring \
# RUN:     -riscv-v-vector-bits-min=512 -o - %s | FileCheck %s

# Test that a scalable slot (%stack.1) is not merged into a non-scalable one
# (%stack.0)

# CHECK:    {{^}}stack:
# CHECK-NEXT: - { id: 0,
# CHECK:      - { id: 1,

--- |
  define dso_local void @dont_merge() {
  entry:
    %buf1 = alloca <4 x i32>
    %buf2 = alloca <vscale x 4 x i32>
    ret void
  }

...
---
name:            dont_merge
tracksRegLiveness: true
stack:
  - { id: 0, name: buf1, size: 16, alignment: 16 }
  - { id: 1, name: buf2, size: 16, alignment: 16, stack-id: scalable-vector }
body:             |
  bb.0.entry:
    liveins: $v8, $v10, $x10, $x11

    LIFETIME_START %stack.0
    VS1R_V killed renamable $v8, %stack.0 :: (store 16 into %stack.0, align 16)
    renamable $v8 = VL1RE8_V killed $x10 :: (load 16 from %stack.0, align 16)
    LIFETIME_END %stack.0
    LIFETIME_START %stack.1
    VS2R_V killed renamable $v10m2, %stack.1 :: (store unknown-size into %stack.1, align 16)
    renamable $v10m2 = VL2RE8_V killed $x11 :: (load unknown-size from %stack.1, align 16)
    LIFETIME_END %stack.1
    PseudoRET
...