brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · c4ad110 Raw
102 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx < %s | FileCheck %s2; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-VSX %s3target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"4target triple = "powerpc64-unknown-linux-gnu"5 6define float @test1(float %x) nounwind  {7  %call = tail call float @floorf(float %x) nounwind readnone8  ret float %call9 10; CHECK-LABEL: test1:11; CHECK: frim 1, 112; CHECK-VSX-LABEL: test1:13; CHECK-VSX: xsrdpim 1, 114}15 16declare float @floorf(float) nounwind readnone17 18define double @test2(double %x) nounwind  {19  %call = tail call double @floor(double %x) nounwind readnone20  ret double %call21 22; CHECK-LABEL: test2:23; CHECK: frim 1, 124; CHECK-VSX-LABEL: test2:25; CHECK-VSX: xsrdpim 1, 126}27 28declare double @floor(double) nounwind readnone29 30define float @test3(float %x) nounwind  {31  %call = tail call float @roundf(float %x) nounwind readnone32  ret float %call33 34; CHECK-LABEL: test3:35; CHECK: frin 1, 136; CHECK-VSX-LABEL: test3:37; CHECK-VSX: xsrdpi 1, 138}39 40declare float @roundf(float) nounwind readnone41 42define double @test4(double %x) nounwind  {43  %call = tail call double @round(double %x) nounwind readnone44  ret double %call45 46; CHECK-LABEL: test4:47; CHECK: frin 1, 148; CHECK-VSX-LABEL: test4:49; CHECK-VSX: xsrdpi 1, 150}51 52declare double @round(double) nounwind readnone53 54define float @test5(float %x) nounwind  {55  %call = tail call float @ceilf(float %x) nounwind readnone56  ret float %call57 58; CHECK-LABEL: test5:59; CHECK: frip 1, 160; CHECK-VSX-LABEL: test5:61; CHECK-VSX: xsrdpip 1, 162}63 64declare float @ceilf(float) nounwind readnone65 66define double @test6(double %x) nounwind  {67  %call = tail call double @ceil(double %x) nounwind readnone68  ret double %call69 70; CHECK-LABEL: test6:71; CHECK: frip 1, 172; CHECK-VSX-LABEL: test6:73; CHECK-VSX: xsrdpip 1, 174}75 76declare double @ceil(double) nounwind readnone77 78define float @test9(float %x) nounwind  {79  %call = tail call float @truncf(float %x) nounwind readnone80  ret float %call81 82; CHECK-LABEL: test9:83; CHECK: friz 1, 184; CHECK-VSX-LABEL: test9:85; CHECK-VSX: xsrdpiz 1, 186}87 88declare float @truncf(float) nounwind readnone89 90define double @test10(double %x) nounwind  {91  %call = tail call double @trunc(double %x) nounwind readnone92  ret double %call93 94; CHECK-LABEL: test10:95; CHECK: friz 1, 196; CHECK-VSX-LABEL: test10:97; CHECK-VSX: xsrdpiz 1, 198}99 100declare double @trunc(double) nounwind readnone101 102