1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 15:32:52 +01:00
llvm-mirror/test/Regression/CodeGen/X86/shift-folding.ll

20 lines
413 B
LLVM
Raw Normal View History

2005-08-19 03:17:18 +02:00
; RUN: llvm-as < %s | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
2005-05-09 19:09:31 +02:00
int* %test1(int *%P, uint %X) {
%Y = shr uint %X, ubyte 2
%P2 = getelementptr int* %P, uint %Y
ret int* %P2
}
int* %test2(int *%P, uint %X) {
%Y = shl uint %X, ubyte 2
%P2 = getelementptr int* %P, uint %Y
ret int* %P2
}
int* %test3(int *%P, int %X) {
%Y = shr int %X, ubyte 2
%P2 = getelementptr int* %P, int %Y
ret int* %P2
}