blob: d6c149f8166189c3c29baf2d1c81d8993a94d5a6 [file] [log] [blame]
Kamil Rytarowskicce21c12017-07-12 13:24:46 +00001; RUN: opt -basicaa -aa-eval -disable-output < %s > /dev/null 2>&1
Dan Gohman7c34ece2010-06-28 21:16:52 +00002
3; BasicAA shouldn't infinitely recurse on the use-def cycles in
4; unreachable code.
5
6define void @func_2() nounwind {
7entry:
8 unreachable
9
10bb:
11 %t = select i1 undef, i32* %t, i32* undef
12 %p = select i1 undef, i32* %p, i32* %p
13 %q = select i1 undef, i32* undef, i32* %p
David Blaikie79e6c742015-02-27 19:29:02 +000014 %a = getelementptr i8, i8* %a, i32 0
Dan Gohman7c34ece2010-06-28 21:16:52 +000015 unreachable
16}