mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[AArch64] Implement __jcvt intrinsic from Armv8.3-A
The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined. This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function. The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used. I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example). make check-all didn't show any new failures. [1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics Differential Revision: https://reviews.llvm.org/D64495 llvm-svn: 366197
This commit is contained in:
parent
4209e96014
commit
c4056176b9
@ -31,6 +31,8 @@ def int_aarch64_sdiv : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>,
|
|||||||
def int_aarch64_udiv : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>,
|
def int_aarch64_udiv : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>,
|
||||||
LLVMMatchType<0>], [IntrNoMem]>;
|
LLVMMatchType<0>], [IntrNoMem]>;
|
||||||
|
|
||||||
|
def int_aarch64_fjcvtzs : Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// HINT
|
// HINT
|
||||||
|
|
||||||
|
@ -717,7 +717,9 @@ let Predicates = [HasPA] in {
|
|||||||
// v8.3a floating point conversion for javascript
|
// v8.3a floating point conversion for javascript
|
||||||
let Predicates = [HasJS, HasFPARMv8] in
|
let Predicates = [HasJS, HasFPARMv8] in
|
||||||
def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32,
|
def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32,
|
||||||
"fjcvtzs", []> {
|
"fjcvtzs",
|
||||||
|
[(set GPR32:$Rd,
|
||||||
|
(int_aarch64_fjcvtzs FPR64:$Rn))]> {
|
||||||
let Inst{31} = 0;
|
let Inst{31} = 0;
|
||||||
} // HasJS, HasFPARMv8
|
} // HasJS, HasFPARMv8
|
||||||
|
|
||||||
|
10
test/CodeGen/AArch64/fjcvtzs.ll
Normal file
10
test/CodeGen/AArch64/fjcvtzs.ll
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
; RUN: llc -mtriple=arm64-eabi -mattr=+jsconv -o - %s | FileCheck %s
|
||||||
|
|
||||||
|
define i32 @test_jcvt(double %v) {
|
||||||
|
; CHECK-LABEL: test_jcvt:
|
||||||
|
; CHECK: fjcvtzs w0, d0
|
||||||
|
%val = call i32 @llvm.aarch64.fjcvtzs(double %v)
|
||||||
|
ret i32 %val
|
||||||
|
}
|
||||||
|
|
||||||
|
declare i32 @llvm.aarch64.fjcvtzs(double)
|
@ -372,7 +372,7 @@ def svn_push_one_rev(svn_repo, rev, git_to_svn_mapping, dry_run):
|
|||||||
# Now we're ready to commit.
|
# Now we're ready to commit.
|
||||||
commit_msg = git('show', '--pretty=%B', '--quiet', rev)
|
commit_msg = git('show', '--pretty=%B', '--quiet', rev)
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
commit_args = ['commit', '-m', commit_msg]
|
commit_args = ['commit', '-m', commit_msg, '--username', 'ktkachov']
|
||||||
if '--force-interactive' in svn(svn_repo, 'commit', '--help'):
|
if '--force-interactive' in svn(svn_repo, 'commit', '--help'):
|
||||||
commit_args.append('--force-interactive')
|
commit_args.append('--force-interactive')
|
||||||
log(svn(svn_repo, *commit_args))
|
log(svn(svn_repo, *commit_args))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user