1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
4 define void @_Z4testSt7complexIfE(float %v0, float %v1, ptr %ref.tmp, ptr %_M_value.realp.i.i, ptr %_M_value.imagp.i.i) {
6 %v2 = load i64, ptr %ref.tmp, align 8
8 %v4 = trunc i64 %v3 to i32
9 %v5 = bitcast i32 %v4 to float
10 %v6 = trunc i64 %v2 to i32
11 %v7 = bitcast i32 %v6 to float
12 %mul_ad.i.i = fmul float %v5, %v1
13 %mul_bc.i.i = fmul float %v7, %v0
14 %mul_i.i.i = fadd float %mul_ad.i.i, %mul_bc.i.i
15 %mul_ac.i.i = fmul float %v5, %v0
16 %mul_bd.i.i = fmul float %v7, %v1
17 %mul_r.i.i = fsub float %mul_ac.i.i, %mul_bd.i.i
18 store float %mul_r.i.i, ptr %_M_value.realp.i.i, align 4
19 store float %mul_i.i.i, ptr %_M_value.imagp.i.i, align 4
22 ; CHECK-LABEL: @_Z4testSt7complexIfE
23 ; CHECK-NOT: ld {{[0-9]+}}, 0(5)
26 ; CHECK-DAG: lfs {{[0-9]+}}, 4(5)
27 ; CHECK-DAG: lfs {{[0-9]+}}, 0(5)
31 define ptr @_Z4testSt7complexIfE_idx(float %v0, float %v1, ptr %ref.tmp, ptr %_M_value.realp.i.i, ptr %_M_value.imagp.i.i) {
33 %r = getelementptr i64, ptr %ref.tmp, i64 1
34 %v2 = load i64, ptr %r, align 8
35 %v3 = lshr i64 %v2, 32
36 %v4 = trunc i64 %v3 to i32
37 %v5 = bitcast i32 %v4 to float
38 %v6 = trunc i64 %v2 to i32
39 %v7 = bitcast i32 %v6 to float
40 %mul_ad.i.i = fmul float %v5, %v1
41 %mul_bc.i.i = fmul float %v7, %v0
42 %mul_i.i.i = fadd float %mul_ad.i.i, %mul_bc.i.i
43 %mul_ac.i.i = fmul float %v5, %v0
44 %mul_bd.i.i = fmul float %v7, %v1
45 %mul_r.i.i = fsub float %mul_ac.i.i, %mul_bd.i.i
46 store float %mul_r.i.i, ptr %_M_value.realp.i.i, align 4
47 store float %mul_i.i.i, ptr %_M_value.imagp.i.i, align 4
50 ; CHECK-LABEL: @_Z4testSt7complexIfE
51 ; CHECK-NOT: ld {{[0-9]+}}, 8(5)
52 ; CHECK-NOT: ldu {{[0-9]+}}, 8(5)
55 ; CHECK-DAG: lfsu {{[0-9]+}}, 8(3)
56 ; CHECK-DAG: lfs {{[0-9]+}}, 4(3)