mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
b4dc0233c9
This was done with the following sed invocation to catch label lines demarking function boundaries: sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186258 91177308-0d34-0410-b5e6-96231b3b80d8
48 lines
1.1 KiB
LLVM
48 lines
1.1 KiB
LLVM
; RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8
|
|
; RUN: llc -march=sparc -O0 < %s | FileCheck %s -check-prefix=V8-UNOPT
|
|
; RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9
|
|
|
|
|
|
; V8-LABEL: test_neg:
|
|
; V8: call get_double
|
|
; V8: fnegs %f0, %f0
|
|
|
|
; V8-UNOPT: test_neg:
|
|
; V8-UNOPT: fnegs
|
|
; V8-UNOPT: ! implicit-def
|
|
; V8-UNOPT: fmovs {{.+}}, %f0
|
|
; V8-UNOPT: fmovs {{.+}}, %f1
|
|
|
|
; V9-LABEL: test_neg:
|
|
; V9: fnegd %f0, %f0
|
|
|
|
define double @test_neg() {
|
|
entry:
|
|
%0 = tail call double @get_double()
|
|
%1 = fsub double -0.000000e+00, %0
|
|
ret double %1
|
|
}
|
|
|
|
; V8-LABEL: test_abs:
|
|
; V8: fabss %f0, %f0
|
|
|
|
; V8-UNOPT: test_abs:
|
|
; V8-UNOPT: fabss
|
|
; V8-UNOPT: ! implicit-def
|
|
; V8-UNOPT: fmovs {{.+}}, %f0
|
|
; V8-UNOPT: fmovs {{.+}}, %f1
|
|
|
|
; V9-LABEL: test_abs:
|
|
; V9: fabsd %f0, %f0
|
|
|
|
define double @test_abs() {
|
|
entry:
|
|
%0 = tail call double @get_double()
|
|
%1 = tail call double @llvm.fabs.f64(double %0)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @get_double()
|
|
declare double @llvm.fabs.f64(double) nounwind readonly
|
|
|