Ehsan Amiri | a538b0f | 2016-08-03 18:17:35 +0000 | [diff] [blame] | 1 | ; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s |
Tim Shen | 1c3c0af | 2016-07-06 17:44:03 +0000 | [diff] [blame] | 2 | target triple = "powerpc64le-unknown-linux-gnu" |
| 3 | |
| 4 | %StructA = type { double, double, double, double, double, double, double, double } |
| 5 | |
| 6 | define void @Test(%StructA* %tmp) unnamed_addr #0 align 2 { |
| 7 | ; CHECK-LABEL: Test: |
| 8 | ; CHECK: lxvd2x |
| 9 | ; CHECK-NEXT: xxswapd |
| 10 | ; CHECK: lxvd2x |
| 11 | ; CHECK-NEXT: xxswapd |
| 12 | ; CHECK: lxvd2x |
| 13 | ; CHECK-NEXT: xxswapd |
| 14 | ; CHECK: lxvd2x |
| 15 | ; CHECK-NEXT: xxswapd |
| 16 | ; CHECK: xxswapd [[OUTPUT:[0-9]+]] |
| 17 | ; CHECK-NEXT: stxvd2x [[OUTPUT]] |
| 18 | bb: |
| 19 | %tmp2 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 0 |
| 20 | %tmp4 = bitcast %StructA* %tmp to <2 x double>* |
| 21 | %tmp5 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 2 |
| 22 | %tmp9 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 4 |
| 23 | %tmp11 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 5 |
| 24 | %tmp13 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 6 |
| 25 | %tmp15 = getelementptr inbounds %StructA, %StructA* %tmp, i64 0, i32 7 |
| 26 | %tmp18 = load double, double* %tmp2, align 16 |
| 27 | %tmp19 = load double, double* %tmp11, align 8 |
| 28 | %tmp20 = load double, double* %tmp9, align 16 |
| 29 | %tmp21 = fsub double 1.210000e+04, %tmp20 |
| 30 | %tmp22 = fmul double %tmp18, %tmp21 |
| 31 | %tmp23 = fadd double %tmp20, %tmp22 |
| 32 | %tmp24 = load double, double* %tmp13, align 16 |
| 33 | %tmp25 = fsub double 1.000000e+02, %tmp24 |
| 34 | %tmp26 = fmul double %tmp18, %tmp25 |
| 35 | %tmp27 = fadd double %tmp24, %tmp26 |
| 36 | %tmp28 = load double, double* %tmp15, align 8 |
| 37 | %tmp29 = insertelement <2 x double> undef, double %tmp19, i32 0 |
| 38 | %tmp30 = insertelement <2 x double> %tmp29, double %tmp28, i32 1 |
| 39 | %tmp31 = fsub <2 x double> <double 1.100000e+04, double 1.100000e+02>, %tmp30 |
| 40 | %tmp32 = insertelement <2 x double> undef, double %tmp18, i32 0 |
| 41 | %tmp33 = insertelement <2 x double> %tmp32, double %tmp18, i32 1 |
| 42 | %tmp34 = fmul <2 x double> %tmp33, %tmp31 |
| 43 | %tmp35 = fadd <2 x double> %tmp30, %tmp34 |
| 44 | %tmp36 = bitcast double* %tmp5 to <2 x double>* |
| 45 | %tmp37 = load <2 x double>, <2 x double>* %tmp36, align 16 |
| 46 | %tmp38 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+04>, %tmp37 |
| 47 | %tmp39 = fmul <2 x double> %tmp33, %tmp38 |
| 48 | %tmp40 = fadd <2 x double> %tmp37, %tmp39 |
| 49 | %tmp41 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+04>, %tmp40 |
| 50 | %tmp42 = fmul <2 x double> %tmp33, %tmp41 |
| 51 | %tmp43 = fadd <2 x double> %tmp40, %tmp42 |
| 52 | %tmp44 = fsub <2 x double> <double 1.200000e+04, double 1.200000e+02>, %tmp35 |
| 53 | %tmp45 = fmul <2 x double> %tmp33, %tmp44 |
| 54 | %tmp46 = fadd <2 x double> %tmp35, %tmp45 |
| 55 | %tmp48 = fsub double 1.440000e+04, %tmp23 |
| 56 | %tmp49 = fmul double %tmp18, %tmp48 |
| 57 | %tmp50 = fadd double %tmp23, %tmp49 |
| 58 | store double %tmp50, double* %tmp9, align 16 |
| 59 | %tmp51 = fsub double 1.000000e+02, %tmp27 |
| 60 | %tmp52 = fmul double %tmp18, %tmp51 |
| 61 | %tmp53 = fadd double %tmp27, %tmp52 |
| 62 | store double %tmp53, double* %tmp13, align 16 |
| 63 | %tmp54 = extractelement <2 x double> %tmp46, i32 1 |
| 64 | store double %tmp54, double* %tmp15, align 8 |
| 65 | %tmp55 = bitcast double* %tmp5 to <2 x double>* |
| 66 | store <2 x double> %tmp43, <2 x double>* %tmp55, align 16 |
| 67 | ret void |
| 68 | } |
| 69 | |
| 70 | attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pwr8" "target-features"="+altivec,+bpermd,+crypto,+direct-move,+extdiv,+power8-vector,+vsx,-qpx" "unsafe-fp-math"="false" "use-soft-float"="false" } |