summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/sbfx.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-22 00:40:00 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-22 00:40:00 +0000
commit0f55e9ce2e1c451cfc5b7978c3bbe46b2def4c48 (patch)
treecdb50c4d775ccdf34632cd587a1d04a06e580a8f /llvm/test/CodeGen/ARM/sbfx.ll
parent6746d43a3fcf964b2254ee3983b22ca71e814a34 (diff)
downloadbcm5719-llvm-0f55e9ce2e1c451cfc5b7978c3bbe46b2def4c48.tar.gz
bcm5719-llvm-0f55e9ce2e1c451cfc5b7978c3bbe46b2def4c48.zip
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
llvm-svn: 84813
Diffstat (limited to 'llvm/test/CodeGen/ARM/sbfx.ll')
-rw-r--r--llvm/test/CodeGen/ARM/sbfx.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/sbfx.ll b/llvm/test/CodeGen/ARM/sbfx.ll
index 923f52a8686..6f1d87d2c17 100644
--- a/llvm/test/CodeGen/ARM/sbfx.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud