1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/CodeGen/Lanai/shift.ll
Jacques Pienaar 9af311f3de [lanai] Add Lanai backend.
Add the Lanai backend to lib/Target.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).

Differential Revision: http://reviews.llvm.org/D17011

llvm-svn: 264578
2016-03-28 13:09:54 +00:00

29 lines
463 B
LLVM

; RUN: llc < %s -march=lanai | FileCheck %s
; Test lowering of shifts.
define i32 @irs(i32 inreg %a) #0 {
entry:
%shr = ashr i32 %a, 13
ret i32 %shr
}
; CHECK-LABEL: irs
; CHECK: sha %r6, -0xd, %rv
define i32 @urs(i32 inreg %a) #0 {
entry:
%shr = lshr i32 %a, 13
ret i32 %shr
}
; CHECK-LABEL: urs
; CHECK: sh %r6, -0xd, %rv
define i32 @ls(i32 inreg %a) #0 {
entry:
%shl = shl i32 %a, 13
ret i32 %shl
}
; CHECK-LABEL: ls
; CHECK: sh %r6, 0xd, %rv