Jonas Paulsson | c0ee028 | 2018-11-12 08:12:20 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s |
| 2 | |
| 3 | ; Test a vector which is built with elements from two loads replicates the |
| 4 | ; load with most elements having its value. |
| 5 | |
| 6 | ; CHECK: vlef |
| 7 | ; CHECK-NOT: vlvgf |
| 8 | |
| 9 | define void @update(i32* %src1, i32* %src2, <4 x i32>* %dst) { |
| 10 | bb: |
| 11 | %tmp = load i32, i32* %src1 |
| 12 | %tmp1 = load i32, i32* %src2 |
| 13 | %tmp2 = insertelement <4 x i32> undef, i32 %tmp, i32 0 |
| 14 | %tmp3 = insertelement <4 x i32> %tmp2, i32 %tmp1, i32 1 |
| 15 | %tmp4 = insertelement <4 x i32> %tmp3, i32 %tmp1, i32 2 |
| 16 | %tmp5 = insertelement <4 x i32> %tmp4, i32 %tmp1, i32 3 |
| 17 | store <4 x i32> %tmp5, <4 x i32>* %dst |
| 18 | ret void |
| 19 | } |