blob: 7847fc89371b8d0e89881074335a50eaa59e2c48 [file] [log] [blame]
Vladimir Stefanovic0ef60da2018-08-29 14:07:14 +00001; RUN: llc -o - %s -mtriple=mips-unknown-linux-gnu \
2; RUN: -mcpu=mips32 -mattr=+fpxx \
3; RUN: -stop-after=expand-isel-pseudos | \
4; RUN: FileCheck %s -check-prefix=FPXX-IMPLICIT-SP
5
6; RUN: llc -o - %s -mtriple=mips-unknown-linux-gnu \
7; RUN: -mcpu=mips32r6 -mattr=+fp64,+nooddspreg \
8; RUN: -stop-after=expand-isel-pseudos | \
9; RUN: FileCheck %s -check-prefix=FP64-IMPLICIT-SP
10
11; RUN: llc -o - %s -mtriple=mips-unknown-linux-gnu \
12; RUN: -mcpu=mips32r2 -mattr=+fpxx \
13; RUN: -stop-after=expand-isel-pseudos | \
14; RUN: FileCheck %s -check-prefix=NO-IMPLICIT-SP
15
16define double @foo2(i32 signext %v1, double %d1) {
17entry:
18; FPXX-IMPLICIT-SP: BuildPairF64 %{{[0-9]+}}, %{{[0-9]+}}, implicit $sp
19; FPXX-IMPLICIT-SP: ExtractElementF64 killed %{{[0-9]+}}, 1, implicit $sp
20; FP64-IMPLICIT-SP: BuildPairF64_64 %{{[0-9]+}}, %{{[0-9]+}}, implicit $sp
21; FP64-IMPLICIT-SP: ExtractElementF64_64 killed %{{[0-9]+}}, 1, implicit $sp
22; NO-IMPLICIT-SP: BuildPairF64 %{{[0-9]+}}, %{{[0-9]+}}
23; NO-IMPLICIT-SP-NOT: BuildPairF64 %{{[0-9]+}}, %{{[0-9]+}}, implicit $sp
24; NO-IMPLICIT-SP: ExtractElementF64 killed %{{[0-9]+}}, 1
25; NO-IMPLICIT-SP-NOT: ExtractElementF64 killed %{{[0-9]+}}, 1, implicit $sp
26 %conv = fptrunc double %d1 to float
27 %0 = tail call float @llvm.copysign.f32(float 1.000000e+00, float %conv)
28 %conv1 = fpext float %0 to double
29 ret double %conv1
30}
31
32declare float @llvm.copysign.f32(float, float)