File: nbench1.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (64 lines) | stat: -rw-r--r-- 2,489 bytes parent folder | download | duplicates (4)
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
53
54
55
56
57
58
59
60
61
62
63
64
; RUN: llc -march=hexagon -O3 < %s | FileCheck %s

; if instruction being considered for addition to packet has higher latency,
; end existing packet and start a new one.

; CHECK: .LBB0_4:
; CHECK: p{{[0-3]+}} = cmp.gtu(r{{[0-9]+}},r{{[0-9]+}})
; CHECK-NEXT: }

@array = external dso_local local_unnamed_addr global i32*, align 4

; Function Attrs: nofree norecurse nounwind
define dso_local void @NumSift(i32 %i, i32 %j) local_unnamed_addr #0 {
entry:
  %add36 = shl i32 %i, 1
  %cmp.not37 = icmp ugt i32 %add36, %j
  br i1 %cmp.not37, label %while.end, label %while.body.lr.ph

while.body.lr.ph:                                 ; preds = %entry
  %0 = load i32*, i32** @array, align 4
  %add16 = add i32 %j, 1
  br label %while.body

while.body:                                       ; preds = %while.body.lr.ph, %if.end17
  %add39 = phi i32 [ %add36, %while.body.lr.ph ], [ %add, %if.end17 ]
  %i.addr.038 = phi i32 [ %i, %while.body.lr.ph ], [ %i.addr.1, %if.end17 ]
  %cmp2 = icmp ult i32 %add39, %j
  br i1 %cmp2, label %if.then, label %if.end7

if.then:                                          ; preds = %while.body
  %arrayidx = getelementptr inbounds i32, i32* %0, i32 %add39
  %1 = load i32, i32* %arrayidx, align 4
  %add3 = or i32 %add39, 1
  %arrayidx4 = getelementptr inbounds i32, i32* %0, i32 %add3
  %2 = load i32, i32* %arrayidx4, align 4
  %cmp5 = icmp ult i32 %1, %2
  %spec.select = select i1 %cmp5, i32 %add3, i32 %add39
  br label %if.end7

if.end7:                                          ; preds = %if.then, %while.body
  %k.0 = phi i32 [ %add39, %while.body ], [ %spec.select, %if.then ]
  %arrayidx8 = getelementptr inbounds i32, i32* %0, i32 %i.addr.038
  %3 = load i32, i32* %arrayidx8, align 4
  %arrayidx9 = getelementptr inbounds i32, i32* %0, i32 %k.0
  %4 = load i32, i32* %arrayidx9, align 4
  %cmp10 = icmp ult i32 %3, %4
  br i1 %cmp10, label %if.then11, label %if.end17

if.then11:                                        ; preds = %if.end7
  store i32 %3, i32* %arrayidx9, align 4
  store i32 %4, i32* %arrayidx8, align 4
  br label %if.end17

if.end17:                                         ; preds = %if.end7, %if.then11
  %i.addr.1 = phi i32 [ %k.0, %if.then11 ], [ %add16, %if.end7 ]
  %add = shl i32 %i.addr.1, 1
  %cmp.not = icmp ugt i32 %add, %j
  br i1 %cmp.not, label %while.end, label %while.body

while.end:                                        ; preds = %if.end17, %entry
  ret void
}

attributes #0 = { "target-cpu"="hexagonv65" }