1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Alina Sbirlea 91e00bac96 Update MemorySSA in LoopRotate.
Summary:
Teach LoopRotate to preserve MemorySSA.
Enable tests for correctness, dependency disabled by default.

Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits

Differential Revision: https://reviews.llvm.org/D51718

llvm-svn: 345216
2018-10-24 22:46:45 +00:00

29 lines
902 B
LLVM

; RUN: opt < %s -loop-rotate -verify-dom-info -verify-loop-info -disable-output
; RUN: opt < %s -loop-rotate -verify-dom-info -verify-loop-info -enable-mssa-loop-dependency=true -verify-memoryssa -disable-output
define void @func() {
bb0:
br label %bb1
bb1: ; preds = %bb4, %bb0
%0 = phi i16 [ %2, %bb4 ], [ 0, %bb0 ]
%1 = icmp sle i16 %0, 2
br i1 %1, label %bb2, label %bb5
bb2: ; preds = %bb1
br i1 undef, label %bb6, label %bb4
bb3: ; No predecessors!
br label %bb6
bb4: ; preds = %bb2
%2 = add i16 undef, 1
br label %bb1
bb5: ; preds = %bb1
br label %bb6
bb6: ; preds = %bb5, %bb3, %bb2
unreachable
}