1 ; RUN: opt %loadNPMPolly -passes=polly-codegen -polly-invariant-load-hoisting=true -S < %s | FileCheck %s
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 define void @f(ptr %A) {
19 %tmp = load i32, ptr %A, align 4
20 %cmp = icmp sgt i32 %tmp, 42
21 br i1 %cmp, label %if.then, label %if.else
23 if.then: ; preds = %entry
24 %tmp1 = load i32, ptr %A, align 4
25 %add = add nsw i32 %tmp1, 1
28 if.else: ; preds = %entry
29 %tmp2 = load i32, ptr %A, align 4
30 %sub = add nsw i32 %tmp2, -1
33 if.end: ; preds = %if.else, %if.then
34 %storemerge = phi i32 [ %sub, %if.else ], [ %add, %if.then ]
35 store i32 %storemerge, ptr %A, align 4