Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s | FileCheck %s
      2 target datalayout = "E-m:e-i64:64-n32:64"
      3 target triple = "powerpc64-bgq-linux"
      4 
      5 define void @_Z4testSt7complexIfE(float %v0, float %v1, i64* %ref.tmp, float* %_M_value.realp.i.i, float* %_M_value.imagp.i.i) {
      6 entry:
      7   %v2 = load i64, i64* %ref.tmp, align 8
      8   %v3 = lshr i64 %v2, 32
      9   %v4 = trunc i64 %v3 to i32
     10   %v5 = bitcast i32 %v4 to float
     11   %v6 = trunc i64 %v2 to i32
     12   %v7 = bitcast i32 %v6 to float
     13   %mul_ad.i.i = fmul fast float %v5, %v1
     14   %mul_bc.i.i = fmul fast float %v7, %v0
     15   %mul_i.i.i = fadd fast float %mul_ad.i.i, %mul_bc.i.i
     16   %mul_ac.i.i = fmul fast float %v5, %v0
     17   %mul_bd.i.i = fmul fast float %v7, %v1
     18   %mul_r.i.i = fsub fast float %mul_ac.i.i, %mul_bd.i.i
     19   store float %mul_r.i.i, float* %_M_value.realp.i.i, align 4
     20   store float %mul_i.i.i, float* %_M_value.imagp.i.i, align 4
     21   ret void
     22 
     23 ; CHECK-LABEL: @_Z4testSt7complexIfE
     24 ; CHECK-NOT: ld {{[0-9]+}}, 0(5)
     25 ; CHECK-NOT: stw
     26 ; CHECK-NOT: rldicl
     27 ; CHECK-DAG: lfs {{[0-9]+}}, 4(5)
     28 ; CHECK-DAG: lfs {{[0-9]+}}, 0(5)
     29 ; CHECK: blr
     30 }
     31 
     32 define i64* @_Z4testSt7complexIfE_idx(float %v0, float %v1, i64* %ref.tmp, float* %_M_value.realp.i.i, float* %_M_value.imagp.i.i) {
     33 entry:
     34   %r = getelementptr i64, i64* %ref.tmp, i64 1
     35   %v2 = load i64, i64* %r, align 8
     36   %v3 = lshr i64 %v2, 32
     37   %v4 = trunc i64 %v3 to i32
     38   %v5 = bitcast i32 %v4 to float
     39   %v6 = trunc i64 %v2 to i32
     40   %v7 = bitcast i32 %v6 to float
     41   %mul_ad.i.i = fmul fast float %v5, %v1
     42   %mul_bc.i.i = fmul fast float %v7, %v0
     43   %mul_i.i.i = fadd fast float %mul_ad.i.i, %mul_bc.i.i
     44   %mul_ac.i.i = fmul fast float %v5, %v0
     45   %mul_bd.i.i = fmul fast float %v7, %v1
     46   %mul_r.i.i = fsub fast float %mul_ac.i.i, %mul_bd.i.i
     47   store float %mul_r.i.i, float* %_M_value.realp.i.i, align 4
     48   store float %mul_i.i.i, float* %_M_value.imagp.i.i, align 4
     49   ret i64* %r
     50 
     51 ; CHECK-LABEL: @_Z4testSt7complexIfE
     52 ; CHECK-NOT: ld {{[0-9]+}}, 8(5)
     53 ; CHECK-NOT: ldu {{[0-9]+}}, 8(5)
     54 ; CHECK-NOT: stw
     55 ; CHECK-NOT: rldicl
     56 ; CHECK-DAG: lfsu {{[0-9]+}}, 8(5)
     57 ; CHECK-DAG: lfs {{[0-9]+}}, 4(5)
     58 ; CHECK: blr
     59 }
     60 
     61