1 ; RUN: llc -verify-machineinstrs -mcpu=a2 < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 ; Function Attrs: nounwind readonly
6 define double @test1(ptr nocapture readonly %x) #0 {
8 %0 = load i64, ptr %x, align 8
9 %conv = sitofp i64 %0 to double
13 ; CHECK: lfd [[REG1:[0-9]+]], 0(3)
14 ; CHECK: fcfid 1, [[REG1]]
18 ; Function Attrs: nounwind readonly
19 define double @test2(ptr nocapture readonly %x) #0 {
21 %0 = load i32, ptr %x, align 4
22 %conv = sitofp i32 %0 to double
26 ; CHECK: lfiwax [[REG1:[0-9]+]], 0, 3
27 ; CHECK: fcfid 1, [[REG1]]
31 ; Function Attrs: nounwind readnone
32 define float @foo(float %X) #0 {
34 %conv = fptosi float %X to i32
35 %conv1 = sitofp i32 %conv to float
43 ; Function Attrs: nounwind readnone
44 define double @food(double %X) #0 {
46 %conv = fptosi double %X to i32
47 %conv1 = sitofp i32 %conv to double
55 ; Function Attrs: nounwind readnone
56 define float @foou(float %X) #0 {
58 %conv = fptoui float %X to i32
59 %conv1 = uitofp i32 %conv to float
67 ; Function Attrs: nounwind readnone
68 define double @fooud(double %X) #0 {
70 %conv = fptoui double %X to i32
71 %conv1 = uitofp i32 %conv to double
79 attributes #0 = { nounwind readonly "no-signed-zeros-fp-math"="true" }