mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 21:56:15 +00:00
39dfb0ff84
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134590 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
522 B
LLVM
29 lines
522 B
LLVM
; RUN: llc < %s -march=arm -mattr=+v7 | FileCheck %s
|
|
|
|
define i32 @sbfx1(i32 %a) {
|
|
; CHECK: sbfx1
|
|
; CHECK: sbfx r0, r0, #7, #11
|
|
%t1 = lshr i32 %a, 7
|
|
%t2 = trunc i32 %t1 to i11
|
|
%t3 = sext i11 %t2 to i32
|
|
ret i32 %t3
|
|
}
|
|
|
|
define i32 @ubfx1(i32 %a) {
|
|
; CHECK: ubfx1
|
|
; CHECK: ubfx r0, r0, #7, #11
|
|
%t1 = lshr i32 %a, 7
|
|
%t2 = trunc i32 %t1 to i11
|
|
%t3 = zext i11 %t2 to i32
|
|
ret i32 %t3
|
|
}
|
|
|
|
define i32 @ubfx2(i32 %a) {
|
|
; CHECK: ubfx2
|
|
; CHECK: ubfx r0, r0, #7, #11
|
|
%t1 = lshr i32 %a, 7
|
|
%t2 = and i32 %t1, 2047
|
|
ret i32 %t2
|
|
}
|
|
|