mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
e286942bf0
Reviewers: jyknight, lero_chris, venkatra Reviewed By: jyknight Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27127 llvm-svn: 303245
60 lines
1.3 KiB
LLVM
60 lines
1.3 KiB
LLVM
; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -mattr=+fixallfdivsqrt -o - | FileCheck %s
|
|
; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
|
|
|
|
; CHECK-LABEL: test_1
|
|
; CHECK: nop
|
|
; CHECK: nop
|
|
; CHECK: fdivd
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
define double @test_1(double* byval %a, double* byval %b) {
|
|
entry:
|
|
%0 = load double, double* %a, align 8
|
|
%1 = load double, double* %b, align 8
|
|
%res = fdiv double %0, %1
|
|
ret double %res
|
|
}
|
|
|
|
declare double @llvm.sqrt.f64(double) nounwind readonly
|
|
|
|
; CHECK-LABEL: test_2
|
|
; CHECK: nop
|
|
; CHECK: nop
|
|
; CHECK: nop
|
|
; CHECK: nop
|
|
; CHECK: nop
|
|
; CHECK: fsqrtd
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
define double @test_2(double* byval %a) {
|
|
entry:
|
|
%0 = load double, double* %a, align 8
|
|
%1 = call double @llvm.sqrt.f64(double %0) nounwind
|
|
ret double %1
|
|
}
|
|
|