Ehsan Amiri | a538b0f | 2016-08-03 18:17:35 +0000 | [diff] [blame] | 1 | ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -O3 < %s | FileCheck %s |
Kit Barton | f9d0a40 | 2016-07-06 18:03:52 +0000 | [diff] [blame] | 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: xxspltd |
| 13 | ; CHECK-NEXT: xxspltd |
Kit Barton | f9d0a40 | 2016-07-06 18:03:52 +0000 | [diff] [blame] | 14 | ; CHECK-NEXT: xvmuldp |
| 15 | ; CHECK-NEXT: xvmuldp |
| 16 | ; CHECK-NEXT: xvsubdp |
| 17 | ; CHECK-NEXT: xvadddp |
Sean Fertile | 3c8c385 | 2017-01-26 18:59:15 +0000 | [diff] [blame] | 18 | ; CHECK-NEXT: xxswapd |
Kit Barton | f9d0a40 | 2016-07-06 18:03:52 +0000 | [diff] [blame] | 19 | ; CHECK-NEXT: xxpermdi |
| 20 | ; CHECK-NEXT: xvsubdp |
| 21 | ; CHECK-NEXT: xxswapd |
| 22 | ; CHECK-NEXT: stxvd2x |
| 23 | ; CHECK-NEXT: blr |
| 24 | |
| 25 | ; Function Attrs: noinline |
| 26 | define void @zg(i8* %.G0011_640.0, i8* %.G0012_642.0, <2 x double>* %JJ, <2 x double>* %.ka0000_391, double %.unpack, double %.unpack66) #0 { |
| 27 | L.JA291: |
| 28 | %Z.L.JA291.2 = load <2 x double>, <2 x double>* %.ka0000_391, align 16 |
| 29 | store <2 x double> %Z.L.JA291.2, <2 x double>* %JJ, align 8 |
| 30 | %Z.L.JA291.3 = bitcast i8* %.G0012_642.0 to <2 x double>* |
| 31 | %Z.L.JA291.4 = load <2 x double>, <2 x double>* %Z.L.JA291.3, align 1 |
| 32 | %.elt136 = bitcast i8* %.G0011_640.0 to double* |
| 33 | %.unpack137 = load double, double* %.elt136, align 1 |
| 34 | %.elt138 = getelementptr inbounds i8, i8* %.G0011_640.0, i64 8 |
| 35 | %Z.L.JA291.5 = bitcast i8* %.elt138 to double* |
| 36 | %.unpack139 = load double, double* %Z.L.JA291.5, align 1 |
| 37 | %Z.L.JA291.6 = insertelement <2 x double> undef, double %.unpack137, i32 0 |
| 38 | %Z.L.JA291.7 = insertelement <2 x double> %Z.L.JA291.6, double %.unpack137, i32 1 |
| 39 | %Z.L.JA291.8 = fmul <2 x double> %Z.L.JA291.2, %Z.L.JA291.7 |
| 40 | %Z.L.JA291.9 = shufflevector <2 x double> %Z.L.JA291.2, <2 x double> undef, <2 x i32> <i32 1, i32 0> |
| 41 | %Z.L.JA291.10 = insertelement <2 x double> undef, double %.unpack139, i32 0 |
| 42 | %Z.L.JA291.11 = insertelement <2 x double> %Z.L.JA291.10, double %.unpack139, i32 1 |
| 43 | %Z.L.JA291.12 = fmul <2 x double> %Z.L.JA291.9, %Z.L.JA291.11 |
| 44 | %Z.L.JA291.13 = fsub <2 x double> %Z.L.JA291.8, %Z.L.JA291.12 |
| 45 | %Z.L.JA291.14 = fadd <2 x double> %Z.L.JA291.8, %Z.L.JA291.12 |
| 46 | %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> |
| 47 | %Z.L.JA291.16 = fsub <2 x double> %Z.L.JA291.4, %Z.L.JA291.15 |
| 48 | %Z.L.JA291.17 = bitcast i8* %.G0012_642.0 to <2 x double>* |
| 49 | store <2 x double> %Z.L.JA291.16, <2 x double>* %Z.L.JA291.17, align 8 |
| 50 | %.. = bitcast <2 x double>* %JJ to i32* |
| 51 | %.pre = load i32, i32* %.., align 32 |
| 52 | ret void |
| 53 | } |
| 54 | |
Sean Fertile | 3c8c385 | 2017-01-26 18:59:15 +0000 | [diff] [blame] | 55 | attributes #0 = { noinline } |