mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
f71cc94c91
shifts. llvm-svn: 120022
23 lines
364 B
LLVM
23 lines
364 B
LLVM
; RUN: llc --march=cellspu %s -o - | FileCheck %s
|
|
|
|
; signed division rounds towards zero, rotma don't.
|
|
define i32 @sdivide (i32 %val )
|
|
{
|
|
; CHECK: rotmai
|
|
; CHECK: rotmi
|
|
; CHECK: a
|
|
; CHECK: rotmai
|
|
; CHECK: bi $lr
|
|
%rv = sdiv i32 %val, 4
|
|
ret i32 %rv
|
|
}
|
|
|
|
define i32 @udivide (i32 %val )
|
|
{
|
|
; CHECK: rotmi
|
|
; CHECK: bi $lr
|
|
%rv = udiv i32 %val, 4
|
|
ret i32 %rv
|
|
}
|
|
|