blob: 313caed763686e0ab2d69b6eaf1d846505cca16c [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep add | grep lsl
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bic | grep asr
3
4int %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
10int %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}