brintos

brintos / llvm-project-archived public Read only

0
0
Text · 988 B · 44f6dbc Raw
42 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s | FileCheck %s2 3; CHECK: polly.start4;    int /* pure */ g()5;    void f(int *A) {6;      if (g())7;        *A = *A + 1;8;      else9;        *A = *A - 1;10;    }11;12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"13 14define void @f(ptr %A) {15entry:16  br label %entry.split17 18entry.split:19  %call = call i32 @g()20  %cmp = icmp eq i32 %call, 021  br i1 %cmp, label %if.then, label %if.else22 23if.then:                                          ; preds = %entry24  %tmp1 = load i32, ptr %A, align 425  %add = add nsw i32 %tmp1, 126  store i32 %add, ptr %A, align 427  br label %if.end28 29if.else:                                          ; preds = %entry30  %tmp2 = load i32, ptr %A, align 431  %sub = add nsw i32 %tmp2, -132  store i32 %sub, ptr %A, align 433  br label %if.end34 35if.end:                                           ; preds = %if.else, %if.then36  ret void37}38 39declare i32 @g() #040 41attributes #0 = { nounwind readnone }42