File: stm-merge.ll

package info (click to toggle)
llvm-toolchain-3.9 1%3A3.9.1-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 441,060 kB
  • ctags: 428,777
  • sloc: cpp: 2,546,577; ansic: 538,318; asm: 119,677; objc: 103,316; python: 102,148; sh: 27,847; pascal: 5,626; ml: 5,510; perl: 5,293; lisp: 4,801; makefile: 2,177; xml: 686; cs: 362; php: 212; csh: 117
file content (41 lines) | stat: -rw-r--r-- 1,688 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
; RUN: llc -mtriple=thumbv6m-eabi -verify-machineinstrs %s -o - | FileCheck %s
target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv6m--linux-gnueabi"

@d = internal unnamed_addr global i32 0, align 4
@c = internal global i32* null, align 4
@e = internal unnamed_addr global i32* null, align 4

; Function Attrs: nounwind optsize
define void @fn1(i32 %x, i32 %y, i32 %z) #0 {
entry:
; CHECK-LABEL: fn1:
; CHECK: stm r[[BASE:[0-9]]]!, {{.*}}
; CHECK-NOT: {{.*}} r[[BASE]]
  %g = alloca i32, align 4
  %h = alloca i32, align 4
  %i = alloca i32, align 4
  store i32 %x, i32* %i, align 4
  store i32 %y, i32* %h, align 4
  store i32 %z, i32* %g, align 4
  %.pr = load i32, i32* @d, align 4
  %cmp11 = icmp slt i32 %.pr, 1
  br i1 %cmp11, label %for.inc.lr.ph, label %for.body5

for.inc.lr.ph:                                    ; preds = %entry
  store i32 1, i32* @d, align 4
  br label %for.body5

for.body5:                                        ; preds = %entry, %for.inc.lr.ph, %for.body5
  %f.010 = phi i32 [ %inc7, %for.body5 ], [ 0, %for.inc.lr.ph ], [ 0, %entry ]
  store volatile i32* %g, i32** @c, align 4
  %inc7 = add nsw i32 %f.010, 1
  %exitcond = icmp eq i32 %inc7, 2
  br i1 %exitcond, label %for.end8, label %for.body5

for.end8:                                         ; preds = %for.body5
  store i32* %h, i32** @e, align 4
  ret void
}

attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }