42 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output -polly-invariant-load-hoisting=true < %s 2>&1 | FileCheck %s2; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S -polly-invariant-load-hoisting=true < %s 2>&1 | FileCheck %s --check-prefix=IR3;4; Verify we do not create assumptions based on the parameter p_1 which is the5; load %0 and due to error-assumptions not "part of the SCoP".6;7; CHECK: Invalid Context:8; CHECK-NEXT: [releaseCount, p_1] -> { : releaseCount > 0 }9;10; IR: polly.start11target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"12 13; Function Attrs: uwtable14define void @_ZN8NWindows16NSynchronization14CSemaphoreWFMO7ReleaseEi(i32 %releaseCount) {15entry:16 br label %entry.split17 18entry.split: ; preds = %entry19 %cmp = icmp slt i32 %releaseCount, 120 br i1 %cmp, label %return, label %if.end21 22if.end: ; preds = %entry.split23 tail call void @_ZN8NWindows16NSynchronization8CSynchro5EnterEv()24 %0 = load i32, ptr null, align 825 %add = add nsw i32 %0, %releaseCount26 %cmp2 = icmp sgt i32 %add, 027 br i1 %cmp2, label %if.then3, label %if.end528 29if.then3: ; preds = %if.end30 br label %return31 32if.end5: ; preds = %if.end33 br label %return34 35return: ; preds = %if.end5, %if.then3, %entry.split36 %retval.1 = phi i32 [ 1, %entry.split ], [ 1, %if.then3 ], [ 0, %if.end5 ]37 ret void38}39 40; Function Attrs: nounwind uwtable41declare void @_ZN8NWindows16NSynchronization8CSynchro5EnterEv()42