[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / CodeGen / SystemZ / vec-perm-13.ll
blobd4aeffc664172bbcfc11f637beff1074f2be97d5
1 ; Test vector shuffles on vectors with implicitly extended elements
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
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
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   22
23 ; CHECK-VECTOR-NEXT: .byte   23
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                                        
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