~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/CodeGen/CellSPU/div_ops.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc --march=cellspu %s -o - | FileCheck %s
 
2
 
 
3
; signed division rounds towards zero, rotma don't.
 
4
define i32 @sdivide (i32 %val )
 
5
{
 
6
; CHECK: rotmai
 
7
; CHECK: rotmi
 
8
; CHECK: a
 
9
; CHECK: rotmai
 
10
; CHECK: bi $lr
 
11
   %rv = sdiv i32 %val, 4
 
12
   ret i32 %rv
 
13
}
 
14
 
 
15
define i32 @udivide (i32 %val )
 
16
{
 
17
; CHECK: rotmi
 
18
; CHECK: bi $lr
 
19
   %rv = udiv i32 %val, 4
 
20
   ret i32 %rv
 
21
}
 
22