aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Analysis/BasicAA/unreachable-block.ll
blob: e59a16b0b79e6cda6343c5069aae16e4f74ecb39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: opt -aa-pipeline=basic-aa -passes=aa-eval -disable-output < %s > /dev/null 2>&1

; BasicAA shouldn't infinitely recurse on the use-def cycles in
; unreachable code.

define void @func_2() nounwind {
entry:
  unreachable

bb:
  %t = select i1 undef, ptr %t, ptr undef
  %p = select i1 undef, ptr %p, ptr %p
  %q = select i1 undef, ptr undef, ptr %p
  unreachable
}