mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
39a69897ce
Common code sinking is already guarded with a (with default-off!) flag, so add a flag for hoisting, too. D84108 will hopefully make hoisting off-by-default too.
21 lines
424 B
LLVM
21 lines
424 B
LLVM
; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s
|
|
|
|
define void @foo(i1 %c, i8* %p) {
|
|
; CHECK: if:
|
|
; CHECK-NEXT: load i8, i8* %p, align 1, !range !0
|
|
; CHECK: !0 = !{i8 0, i8 1, i8 3, i8 5}
|
|
if:
|
|
br i1 %c, label %then, label %else
|
|
then:
|
|
%t = load i8, i8* %p, !range !0
|
|
br label %out
|
|
else:
|
|
%e = load i8, i8* %p, !range !1
|
|
br label %out
|
|
out:
|
|
ret void
|
|
}
|
|
|
|
!0 = !{ i8 0, i8 1 }
|
|
!1 = !{ i8 3, i8 5 }
|