Ehsan Amiri | a538b0f | 2016-08-03 18:17:35 +0000 | [diff] [blame] | 1 | ; RUN: llc -verify-machineinstrs < %s | FileCheck %s |
Hal Finkel | 77c8b7f | 2015-09-02 16:52:37 +0000 | [diff] [blame] | 2 | target datalayout = "E-m:e-i64:64-n32:64" |
| 3 | target triple = "powerpc64-unknown-linux-gnu" |
| 4 | |
| 5 | ; Function Attrs: nounwind |
| 6 | define <2 x i32> @test1(<4 x i32> %wide.vec) #0 { |
| 7 | entry: |
| 8 | %strided.vec = shufflevector <4 x i32> %wide.vec, <4 x i32> undef, <2 x i32> <i32 0, i32 2> |
| 9 | ret <2 x i32> %strided.vec |
| 10 | |
| 11 | ; CHECK-LABEL: @test1 |
Nemanja Ivanovic | eebbcb6 | 2016-07-12 12:16:27 +0000 | [diff] [blame] | 12 | ; CHECK: xxswapd 35, 34 |
| 13 | ; CHECK: vmrghw 2, 2, 3 |
Hal Finkel | 77c8b7f | 2015-09-02 16:52:37 +0000 | [diff] [blame] | 14 | ; CHECK: blr |
| 15 | } |
| 16 | |
| 17 | ; Function Attrs: nounwind |
| 18 | define <16 x i8> @test2(<16 x i8> %wide.vec) #0 { |
| 19 | entry: |
| 20 | %strided.vec = shufflevector <16 x i8> %wide.vec, <16 x i8> undef, <16 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 8, i32 9, i32 10, i32 11> |
| 21 | ret <16 x i8> %strided.vec |
| 22 | |
| 23 | ; CHECK-LABEL: @test2 |
Tony Jiang | 0a429f0 | 2017-05-24 23:48:29 +0000 | [diff] [blame] | 24 | ; CHECK: xxsldwi 34, 34, 34, 3 |
Hal Finkel | 77c8b7f | 2015-09-02 16:52:37 +0000 | [diff] [blame] | 25 | ; CHECK: blr |
| 26 | } |
| 27 | |
| 28 | attributes #0 = { nounwind "target-cpu"="pwr7" } |
| 29 | |