xref: /aosp_15_r20/external/llvm/test/Transforms/LoopRotate/pr22337.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -loop-rotate -S | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@a = external global i8, align 4
4*9880d681SAndroid Build Coastguard Worker@tmp = global i8* @a
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine void @f() {
7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: define void @f(
8*9880d681SAndroid Build Coastguard Worker; CHECK: getelementptr i8, i8* @a, i32 0
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker  br label %for.preheader
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerfor.preheader:
13*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %if.then8, label %for.body
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Workerfor.body:
16*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %if.end, label %if.then8
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerif.end:
19*9880d681SAndroid Build Coastguard Worker  %arrayidx = getelementptr i8, i8* @a, i32 0
20*9880d681SAndroid Build Coastguard Worker  br label %for.preheader
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Workerif.then8:
23*9880d681SAndroid Build Coastguard Worker  unreachable
24*9880d681SAndroid Build Coastguard Worker}
25