1; RUN: opt %loadNPMPolly -polly-ignore-aliasing -polly-invariant-load-hoisting=true '-passes=print<polly-detect>,print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s 2; RUN: opt %loadNPMPolly -polly-ignore-aliasing -polly-invariant-load-hoisting=true -passes=polly-codegen -disable-output < %s 3; 4; %tmp is added to the list of required hoists by -polly-scops and just 5; assumed to be hoisted. Only -polly-scops recognizes it to be unhoistable 6; because ir depends on %call which cannot be executed speculatively. 7; 8; CHECK-NOT: Invariant Accesses: 9; 10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 11 12; Function Attrs: nounwind uwtable 13define void @cli_hex2int() { 14entry: 15 br label %if.end 16 17if.end: ; preds = %entry 18 %call = call ptr @__ctype_b_loc() #0 19 %tmp = load ptr, ptr %call, align 8 20 %tmp1 = load i16, ptr %tmp, align 2 21 store i16 3, ptr %tmp, align 2 22 br i1 false, label %if.then.2, label %if.end.3 23 24if.then.2: ; preds = %if.end 25 br label %cleanup 26 27if.end.3: ; preds = %if.end 28 br label %cleanup 29 30cleanup: ; preds = %if.end.3, %if.then.2 31 ret void 32} 33 34; Function Attrs: nounwind readnone 35declare ptr @__ctype_b_loc() #0 36 37attributes #0 = { nounwind readnone } 38