aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-11-30 06:35:39 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-11-30 06:35:39 +0000
commitfc69cb475f3df50fb47c0cf8df90c2a77b7ff36a (patch)
tree0cd23908b33d99bf64eb8e7c936b42b6b512a53f /test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll
parent201c9776bd4197569b71fef0519f98a28d1db989 (diff)
downloadexternal_llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.zip
external_llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.tar.gz
external_llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.tar.bz2
Followup to r60283: optimize arbitrary width signed divisions as well
as unsigned divisions. Same caveats as before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll')
-rw-r--r--test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll b/test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll
new file mode 100644
index 0000000..faf7cd4
--- /dev/null
+++ b/test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | grep 63551
+; ModuleID = '<stdin>'
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
+target triple = "i686-pc-linux-gnu"
+
+define signext i16 @a(i16 signext %x) nounwind {
+entry:
+ %div = sdiv i16 %x, 33 ; <i32> [#uses=1]
+ ret i16 %div
+}