llvm-mirror/test/Transforms/GVNHoist/pr37808.ll
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

41 lines
632 B
LLVM

; RUN: opt < %s -gvn-hoist -S | FileCheck %s
define void @func() {
; CHECK-LABEL: @func()
; CHECK: bb6:
; CHECK: store i64 0, i64* undef, align 8
; CHECK: bb7:
; CHECK-NOT: store i64 0, i64* undef, align 8
; CHECK: bb8:
; CHECK-NOT: store i64 0, i64* undef, align 8
entry:
br label %bb1
bb1:
br label %bb2
bb2:
br label %bb3
bb3:
br i1 undef, label %bb4, label %bb2
bb4:
br i1 undef, label %bb5, label %bb3
bb5:
br label %bb6
bb6:
br i1 undef, label %bb7, label %bb8
bb7:
store i64 0, i64* undef, align 8
unreachable
bb8:
store i64 0, i64* undef, align 8
ret void
}