Filter loops that subtract induction variables.
[oota-llvm.git] / test / Transforms / LICM / 2003-12-13-VolatilePromote.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext volatile 1 | grep Loop
2
3 %X = global int 7
4
5 void %testfunc(int %i) {
6         br label %Loop
7
8 Loop:
9         %x = volatile load int* %X  ; Should not promote this to a register
10         %x2 = add int %x, 1
11         store int %x2, int* %X
12         br bool true, label %Out, label %Loop
13
14 Out:
15         ret void
16 }
17