File: machine-scheduler.mir

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,245,044 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,666; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (36 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download | duplicates (3)
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 -mtriple=aarch64-none-linux-gnu -run-pass machine-scheduler  -verify-machineinstrs  -o - %s | FileCheck %s
# RUN: llc -mtriple=aarch64-none-linux-gnu -passes=machine-scheduler -o - %s | FileCheck %s

--- |
  define i64 @load_imp-def(ptr nocapture %P, i32 %v) {
  entry:
    %0 = bitcast ptr %P to ptr
    %1 = load i32, ptr %0
    %conv = zext i32 %1 to i64
    %arrayidx19 = getelementptr inbounds i64, ptr %P, i64 1
    %arrayidx1 = bitcast ptr %arrayidx19 to ptr
    store i32 %v, ptr %arrayidx1
    %2 = load i64, ptr %arrayidx19
    %and = and i64 %2, 4294967295
    %add = add nuw nsw i64 %and, %conv
    ret i64 %add
  }
...
---
# CHECK-LABEL: name: load_imp-def
# CHECK: bb.0.entry:
# CHECK: LDRWui $x0, 1
# CHECK: LDRWui $x0, 0
# CHECK: STRWui $w1, $x0, 2
name: load_imp-def
tracksRegLiveness: true
body: |
  bb.0.entry:
    liveins: $w1, $x0
    $w8 = LDRWui $x0, 1, implicit-def $x8  :: (load (s32) from %ir.0)
    STRWui killed $w1, $x0, 2 :: (store (s32) into %ir.arrayidx1)
    $w9 = LDRWui killed $x0, 0, implicit-def $x9  :: (load (s32) from %ir.arrayidx19, align 8)
    $x0 = ADDXrr killed $x9, killed $x8
    RET_ReallyLR implicit $x0
...