File: sink-store-pre-load-dependency.mir

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (41 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download | duplicates (6)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - %s -mtriple=armv7-- -run-pass=machine-sink | FileCheck %s

name: sink-store-load-dep
tracksRegLiveness: true
stack:
  - { id: 0, type: default, size: 8, alignment: 8 }
body: |
  bb.0:
    ; CHECK-LABEL: name: sink-store-load-dep
    ; CHECK:       bb.0:
    ; CHECK:         [[LDRi12_:%[0-9]+]]:gpr = LDRi12 %stack.0, 0, 14 /* CC::al */, $noreg :: (load (s32))
    ; CHECK-NEXT:    [[MOVi:%[0-9]+]]:gpr = MOVi 55296, 14 /* CC::al */, $noreg, $noreg
    ; CHECK-NEXT:    [[ADDri1:%[0-9]+]]:gpr = ADDri [[LDRi12_:%[0-9]+]], 0, 14 /* CC::al */, $noreg, $noreg
    ; CHECK-NEXT:    [[LDRH:%[0-9]+]]:gpr = LDRH killed [[ADDri1:%[0-9]+]], $noreg, 0, 14 /* CC::al */, $noreg :: (load (s16))
    ; CHECK-NEXT:    [[MOVi1:%[0-9]+]]:gpr = MOVi 0, 14 /* CC::al */, $noreg, $noreg
    ; CHECK-NEXT:    early-clobber %5:gpr = STRH_PRE [[MOVi:%[0-9]+]], [[LDRi12_:%[0-9]+]], [[MOVi1:%[0-9]+]], 0, 14 /* CC::al */, $noreg
    ; CHECK-NEXT:    [[SUBri:%.*]]:gpr = SUBri killed [[LDRi12_:%[0-9]+]], 0, 14 /* CC::al */, $noreg, $noreg
    ; CHECK:       bb.2:
    ; CHECK-NEXT:    [[MOVi2:%[0-9]+]]:gpr = MOVi [[LDRH:%[0-9]+]], 14 /* CC::al */, $noreg, $noreg
    %0:gpr = LDRi12 %stack.0, 0, 14, $noreg :: (load (s32))
    %1:gpr = MOVi 55296, 14, $noreg, $noreg
    %2:gpr = ADDri %0:gpr, 0, 14, $noreg, $noreg
    %3:gpr = LDRH killed %2:gpr, $noreg, 0, 14, $noreg :: (load (s16))
    %4:gpr = MOVi 0, 14, $noreg, $noreg
    early-clobber %5:gpr = STRH_PRE %1:gpr, %0:gpr, %4:gpr, 0, 14, $noreg
    %6:gpr = SUBri killed %0:gpr, 0, 14, $noreg, $noreg
    CMPri %6:gpr, 0, 14, $noreg, implicit-def $cpsr
    Bcc %bb.2, 3, $cpsr
    B %bb.1

  bb.1:
    %8:gpr = MOVi 0, 14, $noreg, $noreg
    $r0 = COPY %8:gpr
    BX_RET 14, $noreg, implicit $r0

  bb.2:
    %9:gpr = MOVi %3:gpr, 14, $noreg, $noreg
    $r0 = COPY %9:gpr
    BX_RET 14, $noreg, implicit $r0
...