mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Trivial testcase that LCSSA can already handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc3a3bc64b
commit
22cf8b118e
25
test/Transforms/LCSSA/basictest.ll
Normal file
25
test/Transforms/LCSSA/basictest.ll
Normal file
@ -0,0 +1,25 @@
|
||||
; RUN: llvm-as < %s | opt -lcssa | llvm-dis | grep "%lcssa = phi int"
|
||||
|
||||
void %lcssa(bool %S2) {
|
||||
entry:
|
||||
br label %loop.interior
|
||||
|
||||
loop.interior: ; preds = %entry
|
||||
br bool %S2, label %if.true, label %if.false
|
||||
|
||||
if.true:
|
||||
%X1 = add int 0, 0
|
||||
br label %post.if
|
||||
|
||||
if.false:
|
||||
%X2 = add int 0, 1
|
||||
br label %post.if
|
||||
|
||||
post.if:
|
||||
%X3 = phi int [%X1, %if.true], [%X2, %if.false]
|
||||
br bool %S2, label %loop.exit, label %loop.interior
|
||||
|
||||
loop.exit:
|
||||
%X4 = add int 3, %X3
|
||||
ret void
|
||||
}
|
3
test/Transforms/LCSSA/dg.exp
Normal file
3
test/Transforms/LCSSA/dg.exp
Normal file
@ -0,0 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext $llvmgcc_version
|
Loading…
x
Reference in New Issue
Block a user