reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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 -O2 -march=hexagon -mcpu=hexagonv5 < %s
; REQUIRES: asserts
; Check for successful compilation.

@c = common global i32 0, align 4
@e = common global i32 0, align 4
@g = common global i32* null, align 4
@a = common global i32 0, align 4
@b = common global i32 0, align 4
@h = common global i32* null, align 4
@d = common global i32 0, align 4
@f = common global i32 0, align 4

define i32 @fn1([0 x i32]* nocapture readnone %p1) #0 {
entry:
  %0 = load i32*, i32** @h, align 4
  %1 = load i32*, i32** @g, align 4
  %.pre = load i32, i32* @c, align 4
  br label %for.cond

for.cond:
  %2 = phi i32 [ %10, %if.end ], [ %.pre, %entry ]
  store i32 %2, i32* @e, align 4
  %tobool5 = icmp eq i32 %2, 0
  br i1 %tobool5, label %for.end, label %for.body.lr.ph

for.body.lr.ph:
  %3 = sub i32 -5, %2
  %4 = urem i32 %3, 5
  %5 = sub i32 %3, %4
  br label %for.body

for.body:
  %add6 = phi i32 [ %2, %for.body.lr.ph ], [ %add, %for.body ]
  %6 = load i32, i32* %1, align 4
  store i32 %6, i32* @a, align 4
  %add = add nsw i32 %add6, 5
  %tobool = icmp eq i32 %add, 0
  br i1 %tobool, label %for.cond1.for.end_crit_edge, label %for.body

for.cond1.for.end_crit_edge:
  %7 = add i32 %2, 5
  %8 = add i32 %7, %5
  store i32 %8, i32* @e, align 4
  br label %for.end

for.end:
  %9 = load i32, i32* @b, align 4
  %tobool2 = icmp eq i32 %9, 0
  br i1 %tobool2, label %if.end, label %if.then

if.then:
  store i32 0, i32* %0, align 4
  %.pre7 = load i32, i32* @c, align 4
  br label %if.end

if.end:
  %10 = phi i32 [ %2, %for.end ], [ %.pre7, %if.then ]
  store i32 %10, i32* @d, align 4
  %11 = load i32, i32* @f, align 4
  %inc = add nsw i32 %11, 1
  store i32 %inc, i32* @f, align 4
  br label %for.cond
}