diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2008-11-30 06:35:39 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2008-11-30 06:35:39 +0000 |
| commit | fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a (patch) | |
| tree | 0cd23908b33d99bf64eb8e7c936b42b6b512a53f /test/CodeGen | |
| parent | 201c9776bd4197569b71fef0519f98a28d1db989 (diff) | |
| download | llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.tar.gz llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.tar.bz2 llvm-fc69cb475f3df50fb47c0cf8df90c2a77b7ff36a.tar.xz | |
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')
| -rw-r--r-- | test/CodeGen/X86/2008-11-29-DivideConstant16bitSigned.ll | 10 |
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 0000000000..faf7cd4b22 --- /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 +} |
