1; RUN: opt %loadPolly -polly-ignore-aliasing -polly-invariant-load-hoisting=true -polly-scops -analyze < %s | FileCheck %s 2; RUN: opt %loadPolly -polly-ignore-aliasing -polly-invariant-load-hoisting=true -polly-codegen -analyze < %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 i16** @__ctype_b_loc() #0 19 %tmp = load i16*, i16** %call, align 8 20 %arrayidx = getelementptr inbounds i16, i16* %tmp, i64 0 21 %tmp1 = load i16, i16* %arrayidx, align 2 22 store i16 3, i16 *%arrayidx, align 2 23 br i1 false, label %if.then.2, label %if.end.3 24 25if.then.2: ; preds = %if.end 26 br label %cleanup 27 28if.end.3: ; preds = %if.end 29 br label %cleanup 30 31cleanup: ; preds = %if.end.3, %if.then.2 32 ret void 33} 34 35; Function Attrs: nounwind readnone 36declare i16** @__ctype_b_loc() #0 37 38attributes #0 = { nounwind readnone } 39