Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
      2 
      3 define <2 x double> @testi0(<2 x double>* %p1, double* %p2) {
      4   %v = load <2 x double>, <2 x double>* %p1
      5   %s = load double, double* %p2
      6   %r = insertelement <2 x double> %v, double %s, i32 0
      7   ret <2 x double> %r
      8 
      9 ; CHECK-LABEL: testi0
     10 ; CHECK: lxvd2x 0, 0, 3
     11 ; CHECK: lxsdx 1, 0, 4
     12 ; CHECK: xxswapd 0, 0
     13 ; CHECK: xxspltd 1, 1, 0
     14 ; CHECK: xxpermdi 34, 0, 1, 1
     15 }
     16 
     17 define <2 x double> @testi1(<2 x double>* %p1, double* %p2) {
     18   %v = load <2 x double>, <2 x double>* %p1
     19   %s = load double, double* %p2
     20   %r = insertelement <2 x double> %v, double %s, i32 1
     21   ret <2 x double> %r
     22 
     23 ; CHECK-LABEL: testi1
     24 ; CHECK: lxvd2x 0, 0, 3
     25 ; CHECK: lxsdx 1, 0, 4
     26 ; CHECK: xxswapd 0, 0
     27 ; CHECK: xxspltd 1, 1, 0
     28 ; CHECK: xxmrgld 34, 1, 0
     29 }
     30 
     31 define double @teste0(<2 x double>* %p1) {
     32   %v = load <2 x double>, <2 x double>* %p1
     33   %r = extractelement <2 x double> %v, i32 0
     34   ret double %r
     35 
     36 ; CHECK-LABEL: teste0
     37 ; CHECK: lxvd2x 1, 0, 3
     38 }
     39 
     40 define double @teste1(<2 x double>* %p1) {
     41   %v = load <2 x double>, <2 x double>* %p1
     42   %r = extractelement <2 x double> %v, i32 1
     43   ret double %r
     44 
     45 ; CHECK-LABEL: teste1
     46 ; CHECK: lxvd2x 0, 0, 3
     47 ; CHECK: xxswapd 1, 0
     48 }
     49