More build_vector tests.
[oota-llvm.git] / test / CodeGen / X86 / shift-folding.ll
1 ; RUN: llvm-as < %s | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
2
3 int* %test1(int *%P, uint %X) {
4         %Y = shr uint %X, ubyte 2
5         %P2 = getelementptr int* %P, uint %Y
6         ret int* %P2
7 }
8
9 int* %test2(int *%P, uint %X) {
10         %Y = shl uint %X, ubyte 2
11         %P2 = getelementptr int* %P, uint %Y
12         ret int* %P2
13 }
14
15 int* %test3(int *%P, int %X) {
16         %Y = shr int %X, ubyte 2
17         %P2 = getelementptr int* %P, int %Y
18         ret int* %P2
19 }