aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/hoist-with-range.ll
blob: 7ca3ff247dc8b7cdb48e7e4642fd33ca886ef632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: opt < %s -simplifycfg -S | FileCheck %s

define void @foo(i1 %c, i8* %p) {
; CHECK: if:
; CHECK-NEXT: load i8* %p, !range !0
; CHECK: !0 = !{i8 0, i8 1, i8 3, i8 5}
if:
  br i1 %c, label %then, label %else
then:
  %t = load i8* %p, !range !0
  br label %out
else:
  %e = load i8* %p, !range !1
  br label %out
out:
  ret void
}

!0 = !{ i8 0, i8 1 }
!1 = !{ i8 3, i8 5 }