diff options
Diffstat (limited to 'test/CodeGen/ARM/shifter_operand.ll')
-rw-r--r-- | test/CodeGen/ARM/shifter_operand.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/shifter_operand.ll b/test/CodeGen/ARM/shifter_operand.ll new file mode 100644 index 0000000..50c19ba --- /dev/null +++ b/test/CodeGen/ARM/shifter_operand.ll @@ -0,0 +1,15 @@ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep 'add r0, r0, r1, lsl r2' && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep 'bic r0, r0, r1, asr r2' + +int %test1(int %X, int %Y, ubyte %sh) { + %A = shl int %Y, ubyte %sh + %B = add int %X, %A + ret int %B +} + +int %test2(int %X, int %Y, ubyte %sh) { + %A = shr int %Y, ubyte %sh + %B = xor int %A, -1 + %C = and int %X, %B + ret int %C +} |