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
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.
8 ; CHECK-NOT: Invariant Accesses:
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 ; Function Attrs: nounwind uwtable
13 define void @cli_hex2int() {
17 if.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
25 if.then.2: ; preds = %if.end
28 if.end.3: ; preds = %if.end
31 cleanup: ; preds = %if.end.3, %if.then.2
35 ; Function Attrs: nounwind readnone
36 declare i16** @__ctype_b_loc() #0
38 attributes #0 = { nounwind readnone }