diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-22 00:40:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-22 00:40:00 +0000 |
commit | 8000c6c535c5a1d8515299072b51fd1baa8b632f (patch) | |
tree | 29d4e3ecac3f40ab815a7236f366279ac48f711e /test/CodeGen/ARM/sbfx.ll | |
parent | 921bdaaa98c31a07bc5987f7a3412e101173a146 (diff) | |
download | llvm-8000c6c535c5a1d8515299072b51fd1baa8b632f.tar.gz llvm-8000c6c535c5a1d8515299072b51fd1baa8b632f.tar.bz2 llvm-8000c6c535c5a1d8515299072b51fd1baa8b632f.tar.xz |
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/sbfx.ll')
-rw-r--r-- | test/CodeGen/ARM/sbfx.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/sbfx.ll b/test/CodeGen/ARM/sbfx.ll index 923f52a868..6f1d87d2c1 100644 --- a/test/CodeGen/ARM/sbfx.ll +++ b/test/CodeGen/ARM/sbfx.ll @@ -35,3 +35,13 @@ entry: %tmp2 = lshr i32 %tmp, 29 ret i32 %tmp2 } + +define i32 @f5(i32 %a) { +entry: +; CHECK: f5: +; CHECK-NOT: sbfx +; CHECK: bx + %tmp = shl i32 %a, 3 + %tmp2 = ashr i32 %tmp, 1 + ret i32 %tmp2 +} |