1; RUN: llc -verify-machineinstrs -mcpu=a2 < %s | FileCheck %s 2target datalayout = "E-m:e-i64:64-n32:64" 3target triple = "powerpc64-unknown-linux-gnu" 4 5; Function Attrs: nounwind readonly 6define double @test1(i64* nocapture readonly %x) #0 { 7entry: 8 %0 = load i64, i64* %x, align 8 9 %conv = sitofp i64 %0 to double 10 ret double %conv 11 12; CHECK-LABEL: @test1 13; CHECK: lfd [[REG1:[0-9]+]], 0(3) 14; CHECK: fcfid 1, [[REG1]] 15; CHECK: blr 16} 17 18; Function Attrs: nounwind readonly 19define double @test2(i32* nocapture readonly %x) #0 { 20entry: 21 %0 = load i32, i32* %x, align 4 22 %conv = sitofp i32 %0 to double 23 ret double %conv 24 25; CHECK-LABEL: @test2 26; CHECK: lfiwax [[REG1:[0-9]+]], 0, 3 27; CHECK: fcfid 1, [[REG1]] 28; CHECK: blr 29} 30 31; Function Attrs: nounwind readnone 32define float @foo(float %X) #0 { 33entry: 34 %conv = fptosi float %X to i32 35 %conv1 = sitofp i32 %conv to float 36 ret float %conv1 37 38; CHECK-LABEL: @foo 39; CHECK: friz 1, 1 40; CHECK: blr 41} 42 43; Function Attrs: nounwind readnone 44define double @food(double %X) #0 { 45entry: 46 %conv = fptosi double %X to i32 47 %conv1 = sitofp i32 %conv to double 48 ret double %conv1 49 50; CHECK-LABEL: @food 51; CHECK: friz 1, 1 52; CHECK: blr 53} 54 55; Function Attrs: nounwind readnone 56define float @foou(float %X) #0 { 57entry: 58 %conv = fptoui float %X to i32 59 %conv1 = uitofp i32 %conv to float 60 ret float %conv1 61 62; CHECK-LABEL: @foou 63; CHECK: friz 1, 1 64; CHECK: blr 65} 66 67; Function Attrs: nounwind readnone 68define double @fooud(double %X) #0 { 69entry: 70 %conv = fptoui double %X to i32 71 %conv1 = uitofp i32 %conv to double 72 ret double %conv1 73 74; CHECK-LABEL: @fooud 75; CHECK: friz 1, 1 76; CHECK: blr 77} 78 79attributes #0 = { nounwind readonly "no-signed-zeros-fp-math"="true" } 80 81