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
6 define double @foo1(ptr %x) #0 {
8 %0 = load i32, ptr %x, align 4
9 %conv = sext i32 %0 to i64
10 %conv1 = sitofp i64 %conv to double
14 ; CHECK: lfiwax [[REG1:[0-9]+]], 0, 3
15 ; CHECK: fcfid 1, [[REG1]]
19 define double @foo2(ptr %x) #0 {
21 %0 = load i32, ptr %x, align 4
22 %conv = zext i32 %0 to i64
23 %conv1 = sitofp i64 %conv to double
27 ; CHECK: lfiwzx [[REG1:[0-9]+]], 0, 3
28 ; CHECK: fcfid 1, [[REG1]]
32 define double @foo3(ptr %x) #0 {
34 %0 = load i32, ptr %x, align 4
36 %conv = zext i32 %1 to i64
37 %conv1 = sitofp i64 %conv to double
41 ; CHECK-DAG: lwz [[REG1:[0-9]+]], 0(3)
42 ; CHECK-DAG: addi [[REG3:[0-9]+]], 1,
43 ; CHECK-DAG: addi [[REG2:[0-9]+]], [[REG1]], 8
44 ; CHECK-DAG: stw [[REG2]],
45 ; CHECK: lfiwzx [[REG4:[0-9]+]], 0, [[REG3]]
46 ; CHECK: fcfid 1, [[REG4]]
50 define double @foo4(ptr %x) #0 {
52 %0 = load i32, ptr %x, align 4
54 %conv = sext i32 %1 to i64
55 %conv1 = sitofp i64 %conv to double
59 ; CHECK-DAG: lwz [[REG1:[0-9]+]], 0(3)
60 ; CHECK-DAG: addi [[REG3:[0-9]+]], 1,
61 ; CHECK-DAG: addi [[REG2:[0-9]+]], [[REG1]], 8
62 ; CHECK-DAG: stw [[REG2]],
63 ; CHECK: lfiwax [[REG4:[0-9]+]], 0, [[REG3]]
64 ; CHECK: fcfid 1, [[REG4]]
68 attributes #0 = { nounwind }