Home | History | Annotate | Download | only in SystemZ
      1 ; Test vector shuffles on vectors with implicitly extended elements
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \
      4 ; RUN:   FileCheck -check-prefix=CHECK-CODE %s
      5 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \
      6 ; RUN:   FileCheck -check-prefix=CHECK-VECTOR %s
      7 
      8 define <4 x i16> @f1(<4 x i16> %x) {
      9 ; CHECK-CODE-LABEL: f1:
     10 ; CHECK-CODE: larl [[REG:%r[0-5]]],
     11 ; CHECK-CODE: vl [[MASK:%v[0-9]+]], 0([[REG]])
     12 ; CHECK-CODE: vgbm [[ELT:%v[0-9]+]], 0
     13 ; CHECK-CODE: vperm %v24, %v24, [[ELT]], [[MASK]]
     14 ; CHECK-CODE: br %r14
     15 
     16 ; CHECK-VECTOR: .space  1                                        
     17 ; CHECK-VECTOR-NEXT: .space  1                                        
     18 ; CHECK-VECTOR-NEXT: .space  1                                        
     19 ; CHECK-VECTOR-NEXT: .space  1                                        
     20 ; CHECK-VECTOR-NEXT: .byte   6
     21 ; CHECK-VECTOR-NEXT: .byte   7
     22 ; CHECK-VECTOR-NEXT: .byte   16
     23 ; CHECK-VECTOR-NEXT: .byte   17
     24 ; CHECK-VECTOR-NEXT: .space  1                                        
     25 ; CHECK-VECTOR-NEXT: .space  1                                        
     26 ; CHECK-VECTOR-NEXT: .space  1                                        
     27 ; CHECK-VECTOR-NEXT: .space  1                                        
     28 ; CHECK-VECTOR-NEXT: .space  1                                        
     29 ; CHECK-VECTOR-NEXT: .space  1                                        
     30 ; CHECK-VECTOR-NEXT: .space  1                                        
     31 ; CHECK-VECTOR-NEXT: .space  1                                        
     32 
     33   %elt = extractelement <4 x i16> %x, i32 3
     34   %vec1 = insertelement <4 x i16> undef, i16 %elt, i32 2
     35   %vec2 = insertelement <4 x i16> %vec1, i16 0, i32 3
     36   ret <4 x i16> %vec2
     37 }
     38 
     39