ARM test cases contributed by Apple.
[oota-llvm.git] / test / CodeGen / ARM / shifter_operand.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep 'add r0, r0, r1, lsl r2' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep 'bic r0, r0, r1, asr r2'
3
4 int %test1(int %X, int %Y, ubyte %sh) {
5   %A = shl int %Y, ubyte %sh
6   %B = add int %X, %A
7   ret int %B
8 }
9
10 int %test2(int %X, int %Y, ubyte %sh) {
11   %A = shr int %Y, ubyte %sh
12   %B = xor int %A, -1
13   %C = and int %X, %B
14   ret int %C
15 }