1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[NFC] Add failing test on LCSSA form preservation of LoopSimplifyCFG

llvm-svn: 350119
This commit is contained in:
Max Kazantsev 2018-12-28 10:43:37 +00:00
parent 2f3d552ba6
commit 41f8c58cdd

View File

@ -1,7 +1,11 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: asserts
; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -loop-simplifycfg -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -passes='require<domtree>,loop(simplify-cfg)' -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -loop-simplifycfg -enable-mssa-loop-dependency=true -verify-memoryssa -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
; XFAIL: *
; test_01 is currently failing because the loop is not in LCSSA form after the
; transform.
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
@ -50,3 +54,24 @@ if.end.7: ; preds = %if.end
if.end.8: ; preds = %if.end.7
br label %for.cond
}
define void @test_01() {
entry:
br label %for.cond
for.cond.loopexit: ; preds = %while.cond
%inc41.lcssa = phi i16 [ %inc41, %while.cond ]
br label %for.cond
for.cond: ; preds = %for.cond.loopexit, %entry
%inc41.lcssa3 = phi i16 [ %inc41.lcssa, %for.cond.loopexit ], [ undef, %entry ]
br label %while.cond
while.cond: ; preds = %while.body, %for.cond
%inc41 = phi i16 [ %inc4, %while.body ], [ %inc41.lcssa3, %for.cond ]
br i1 true, label %while.body, label %for.cond.loopexit
while.body: ; preds = %while.cond
%inc4 = add nsw i16 %inc41, 1
br label %while.cond
}