Thomas Lively | b6dac89 | 2018-12-21 06:58:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mattr=+simd128 -verify-machineinstrs | FileCheck %s --check-prefixes CHECK |
Thomas Lively | ed95134 | 2018-10-24 23:27:40 +0000 | [diff] [blame] | 2 | |
| 3 | ; Check that shuffles maintain their type when being custom |
| 4 | ; lowered. Regression test for bug 39275. |
| 5 | |
| 6 | target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" |
| 7 | target triple = "wasm32-unknown-unknown" |
| 8 | |
| 9 | ; CHECK: v8x16.shuffle |
| 10 | define <4 x i32> @foo(<4 x i32> %x) { |
| 11 | %1 = shufflevector <4 x i32> %x, <4 x i32> undef, |
| 12 | <4 x i32> <i32 2, i32 3, i32 undef, i32 undef> |
| 13 | %2 = shufflevector <4 x i32> %1, <4 x i32> undef, |
| 14 | <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> |
| 15 | %3 = add <4 x i32> %2, %2 |
| 16 | ret <4 x i32> %3 |
| 17 | } |