mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
New testcase to check to see if LICM is performing scalar promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
420df9bc78
commit
96d20c57f3
21
test/Transforms/LICM/scalar_promote.ll
Normal file
21
test/Transforms/LICM/scalar_promote.ll
Normal file
@ -0,0 +1,21 @@
|
||||
; RUN: as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register"
|
||||
|
||||
%X = global int 7
|
||||
|
||||
void %testfunc(int %i) {
|
||||
br label %Loop
|
||||
|
||||
Loop:
|
||||
%j = phi uint [0, %0], [%Next, %Loop]
|
||||
|
||||
%x = load int* %X ; Should promote this to a register inside of loop!
|
||||
%x2 = add int %x, 1
|
||||
store int %x2, int* %X
|
||||
|
||||
%Next = add uint %j, 1
|
||||
%cond = seteq uint %Next, 0
|
||||
br bool %cond, label %Out, label %Loop
|
||||
|
||||
Out:
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user