File: pip-inner.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (52 lines) | stat: -rw-r--r-- 1,711 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
42
43
44
45
46
47
48
49
50
51
52
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

; Function Attrs: nounwind
define void @foo(ptr %x, ptr nocapture readonly %y) #0 {
entry:
  br label %for.cond1.preheader

for.cond1.preheader:                              ; preds = %for.end, %entry
  %i.015 = phi i32 [ 0, %entry ], [ %inc7, %for.end ]
  br label %for.body3

for.body3:                                        ; preds = %for.body3, %for.cond1.preheader
  %indvars.iv = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next, %for.body3 ]
  %arrayidx = getelementptr inbounds double, ptr %y, i64 %indvars.iv
  %0 = load double, ptr %arrayidx, align 8
  %add = fadd double %0, 1.000000e+00
  %arrayidx5 = getelementptr inbounds double, ptr %x, i64 %indvars.iv
  store double %add, ptr %arrayidx5, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond = icmp eq i64 %indvars.iv.next, 16000
  br i1 %exitcond, label %for.end, label %for.body3

for.end:                                          ; preds = %for.body3
  tail call void @bar(ptr %x) #2
  %inc7 = add nuw nsw i32 %i.015, 1
  %exitcond16 = icmp eq i32 %inc7, 1000
  br i1 %exitcond16, label %for.end8, label %for.cond1.preheader

for.end8:                                         ; preds = %for.end
  ret void

; CHECK-LABEL: @foo

; CHECK: lfdu [[REG1:[0-9]+]], 8({{[0-9]+}})
; CHECK: fadd [[REG2:[0-9]+]], [[REG1]], {{[0-9]+}}
; CHECK: stfdu [[REG2]], 8({{[0-9]+}})
; CHECK: bdnz

; CHECK: bl bar
; CHECK-NEXT: nop

; CHECK: blr
}

declare void @bar(ptr) #1

attributes #0 = { nounwind "target-cpu"="a2" }
attributes #1 = { "target-cpu"="a2" }
attributes #2 = { nounwind }