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
; RUN: opt %loadPolly -polly-ast -analyze < %s | FileCheck %s

; CHECK:      {
; CHECK-NEXT:    if (p <= -1 || p >= 1)
; CHECK-NEXT:      Stmt_preheader();
; CHECK-NEXT:    for (int c0 = 0; c0 < 2 * p; c0 += 1)
; CHECK-NEXT:      Stmt_loop(c0);
; CHECK-NEXT:    if (p <= -1) {
; CHECK-NEXT:      for (int c0 = 0; c0 <= 2 * p + 255; c0 += 1)
; CHECK-NEXT:        Stmt_loop(c0);
; CHECK-NEXT:    } else if (p == 0) {
; CHECK-NEXT:      Stmt_side();
; CHECK-NEXT:    }
; CHECK-NEXT:  }

target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"

define void @zot(float* %A, i32 %arg) {
bb:
  %p = ashr i32 %arg, 25
  %tmpEven = shl nsw i32 %p, 1
  %tmp3 = and i32 %tmpEven, 254
  br label %cond

cond:
  %tmpEvenTrunc = trunc i32 %tmpEven to i8
  %br.cmp = icmp eq i8 %tmpEvenTrunc, 0
  br i1 %br.cmp, label %side, label %preheader

preheader:
  store float 1.0, float* %A
  br label %loop

loop:
  %indvar = phi i32 [ %indvar.next, %loop ], [ 1, %preheader ]
  store float 1.0, float* %A
  %indvar.next = add nuw nsw i32 %indvar, 1
  %cmp = icmp eq i32 %indvar, %tmp3
  br i1 %cmp, label %exit, label %loop

side:
  store float 1.0, float* %A
  br label %ret

exit:
  br label %ret

ret:
  ret void
}