summaryrefslogtreecommitdiff
path: root/polly/test/ScopDetect/switch-in-loop-patch.ll
blob: 1e825f4950afa0fd9246621c573334ce6d1c4240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: opt %loadNPMPolly '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s

; CHECK-NOT: Valid

; Verify that we do not detect loops where the loop latch is a switch statement.
; Such loops are not yet supported by Polly.

define void @f() {
b:
  br label %d

d:
  switch i8 0, label %e [
    i8 71, label %d
    i8 56, label %d
  ]

e:
 ret void
}