1; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s 2target 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" 3target triple = "powerpc64-unknown-linux-gnu" 4 5define float @test1(float %x) nounwind { 6 %call = tail call float @floorf(float %x) nounwind readnone 7 ret float %call 8 9; CHECK-LABEL: test1: 10; CHECK: frim 1, 1 11} 12 13declare float @floorf(float) nounwind readnone 14 15define double @test2(double %x) nounwind { 16 %call = tail call double @floor(double %x) nounwind readnone 17 ret double %call 18 19; CHECK-LABEL: test2: 20; CHECK: frim 1, 1 21} 22 23declare double @floor(double) nounwind readnone 24 25define float @test3(float %x) nounwind { 26 %call = tail call float @roundf(float %x) nounwind readnone 27 ret float %call 28 29; CHECK-LABEL: test3: 30; CHECK: frin 1, 1 31} 32 33declare float @roundf(float) nounwind readnone 34 35define double @test4(double %x) nounwind { 36 %call = tail call double @round(double %x) nounwind readnone 37 ret double %call 38 39; CHECK-LABEL: test4: 40; CHECK: frin 1, 1 41} 42 43declare double @round(double) nounwind readnone 44 45define float @test5(float %x) nounwind { 46 %call = tail call float @ceilf(float %x) nounwind readnone 47 ret float %call 48 49; CHECK-LABEL: test5: 50; CHECK: frip 1, 1 51} 52 53declare float @ceilf(float) nounwind readnone 54 55define double @test6(double %x) nounwind { 56 %call = tail call double @ceil(double %x) nounwind readnone 57 ret double %call 58 59; CHECK-LABEL: test6: 60; CHECK: frip 1, 1 61} 62 63declare double @ceil(double) nounwind readnone 64 65define float @test9(float %x) nounwind { 66 %call = tail call float @truncf(float %x) nounwind readnone 67 ret float %call 68 69; CHECK-LABEL: test9: 70; CHECK: friz 1, 1 71} 72 73declare float @truncf(float) nounwind readnone 74 75define double @test10(double %x) nounwind { 76 %call = tail call double @trunc(double %x) nounwind readnone 77 ret double %call 78 79; CHECK-LABEL: test10: 80; CHECK: friz 1, 1 81} 82 83declare double @trunc(double) nounwind readnone 84 85