| 1 |
; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -O3 < %s | FileCheck %s |
| 2 |
; |
| 3 |
; This is a regression test based on https://llvm.org/bugs/show_bug.cgi?id=27735 |
| 4 |
; |
| 5 |
|
| 6 |
@G1 = global <2 x double> <double 2.0, double -10.0> |
| 7 |
@G2 = global <2 x double> <double 3.0, double 4.0> |
| 8 |
@G3 = global <2 x double> <double 5.0, double 6.0> |
| 9 |
@G4 = global <2 x double> <double 7.0, double 8.0> |
| 10 |
|
| 11 |
; CHECK-LABEL: @zg |
| 12 |
; CHECK: lxvdsx |
| 13 |
; CHECK: xxswapd |
| 14 |
; CHECK-NEXT: xvmuldp |
| 15 |
; CHECK-NEXT: lxvdsx |
| 16 |
; CHECK-DAG: xvmuldp |
| 17 |
; CHECK-DAG: xvsubdp |
| 18 |
; CHECK-DAG: xvadddp |
| 19 |
; CHECK-DAG: xxpermdi |
| 20 |
; CHECK-DAG: xvsubdp |
| 21 |
; CHECK: xxswapd |
| 22 |
; CHECK-NEXT: stxvd2x |
| 23 |
; CHECK: blr |
| 24 |
|
| 25 |
; Function Attrs: noinline |
| 26 |
define void @zg(ptr %.G0011_640.0, ptr %.G0012_642.0, ptr %JJ, ptr %.ka0000_391, double %.unpack, double %.unpack66) #0 { |
| 27 |
L.JA291: |
| 28 |
%Z.L.JA291.2 = load <2 x double>, ptr %.ka0000_391, align 16 |
| 29 |
store <2 x double> %Z.L.JA291.2, ptr %JJ, align 8 |
| 30 |
%Z.L.JA291.4 = load <2 x double>, ptr %.G0012_642.0, align 1 |
| 31 |
%.unpack137 = load double, ptr %.G0011_640.0, align 1 |
| 32 |
%.elt138 = getelementptr inbounds i8, ptr %.G0011_640.0, i64 8 |
| 33 |
%.unpack139 = load double, ptr %.elt138, align 1 |
| 34 |
%Z.L.JA291.6 = insertelement <2 x double> undef, double %.unpack137, i32 0 |
| 35 |
%Z.L.JA291.7 = insertelement <2 x double> %Z.L.JA291.6, double %.unpack137, i32 1 |
| 36 |
%Z.L.JA291.8 = fmul <2 x double> %Z.L.JA291.2, %Z.L.JA291.7 |
| 37 |
%Z.L.JA291.9 = shufflevector <2 x double> %Z.L.JA291.2, <2 x double> undef, <2 x i32> <i32 1, i32 0> |
| 38 |
%Z.L.JA291.10 = insertelement <2 x double> undef, double %.unpack139, i32 0 |
| 39 |
%Z.L.JA291.11 = insertelement <2 x double> %Z.L.JA291.10, double %.unpack139, i32 1 |
| 40 |
%Z.L.JA291.12 = fmul <2 x double> %Z.L.JA291.9, %Z.L.JA291.11 |
| 41 |
%Z.L.JA291.13 = fsub <2 x double> %Z.L.JA291.8, %Z.L.JA291.12 |
| 42 |
%Z.L.JA291.14 = fadd <2 x double> %Z.L.JA291.8, %Z.L.JA291.12 |
| 43 |
%Z.L.JA291.15 = shufflevector <2 x double> %Z.L.JA291.13, <2 x double> %Z.L.JA291.14, <2 x i32> <i32 0, i32 3> |
| 44 |
%Z.L.JA291.16 = fsub <2 x double> %Z.L.JA291.4, %Z.L.JA291.15 |
| 45 |
store <2 x double> %Z.L.JA291.16, ptr %.G0012_642.0, align 8 |
| 46 |
%.pre = load i32, ptr %JJ, align 32 |
| 47 |
ret void |
| 48 |
} |
| 49 |
|
| 50 |
attributes #0 = { noinline } |