1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/Transforms/SimplifyCFG/hoist-with-range.ll
Bjorn Steinbrink ff4459a5f7 Add a test for hoisting instructions with metadata out of then/else blocks
Test for the bug fixed in r215723.

llvm-svn: 217453
2014-09-09 17:10:21 +00:00

21 lines
405 B
LLVM

; 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 = metadata !{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 = metadata !{ i8 0, i8 1 }
!1 = metadata !{ i8 3, i8 5 }