mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
4f0d671b97
Lower the llvm.fabs intrinsic to the 'fabs' MI instruction. This fixes rdar://problem/18946552. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221729 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
562 B
LLVM
20 lines
562 B
LLVM
; RUN: llc -mtriple=aarch64-apple-darwin -verify-machineinstrs < %s | FileCheck %s
|
|
; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -verify-machineinstrs < %s | FileCheck %s
|
|
|
|
define float @fabs_f32(float %a) {
|
|
; CHECK-LABEL: fabs_f32
|
|
; CHECK: fabs s0, s0
|
|
%1 = call float @llvm.fabs.f32(float %a)
|
|
ret float %1
|
|
}
|
|
|
|
define double @fabs_f64(double %a) {
|
|
; CHECK-LABEL: fabs_f64
|
|
; CHECK: fabs d0, d0
|
|
%1 = call double @llvm.fabs.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.fabs.f64(double)
|
|
declare float @llvm.fabs.f32(float)
|