56 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<prepare;ast>' -polly-print-ast -disable-output < %s 2>&1 | FileCheck %s2 3;#include <string.h>4;int A[1];5;6;void constant_condition () {7; int a = 0;8; int b = 0;9;10; if (a == b)11; A[0] = 0;12; else13; A[0] = 1;14;}15;16;int main () {17; int i;18;19; A[0] = 2;20;21; constant_condition();22;23; return A[0];24;}25 26target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"27@A = common global [1 x i32] zeroinitializer, align 4 ; <ptr> [#uses=1]28 29define void @constant_condition() nounwind {30bb:31 %tmp = icmp eq i32 0, 0 ; <i1> [#uses=0]32 br i1 true, label %bb1, label %bb233 34bb1: ; preds = %bb35 store i32 0, ptr @A36 br label %bb337 38bb2: ; preds = %bb39 store i32 1, ptr @A40 br label %bb341 42bb3: ; preds = %bb2, %bb143 ret void44}45 46define i32 @main() nounwind {47bb:48 store i32 2, ptr @A49 call void @constant_condition()50 %tmp = load i32, ptr @A ; <i32> [#uses=1]51 ret i32 %tmp52}53 54 55; CHECK: Stmt_bb1();56