Files
clang-p2996/llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll
Thomas Lively a781a706b9 [WebAssembly][SIMD] Rename shuffle, swizzle, and load_splats
These instructions previously used prefixes like v8x16 to signify that they were
agnostic between float and int interpretations. We renamed these instructions to
remove this form of prefix in https://github.com/WebAssembly/simd/issues/297 and
https://github.com/WebAssembly/simd/issues/316 and this commit brings the names
in LLVM up to date.

Differential Revision: https://reviews.llvm.org/D93722
2020-12-22 14:29:06 -08:00

18 lines
613 B
LLVM

; RUN: llc < %s -mattr=+simd128 -verify-machineinstrs | FileCheck %s --check-prefixes CHECK
; Check that shuffles maintain their type when being custom
; lowered. Regression test for bug 39275.
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
; CHECK: i8x16.shuffle
define <4 x i32> @foo(<4 x i32> %x) {
%1 = shufflevector <4 x i32> %x, <4 x i32> undef,
<4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
%2 = shufflevector <4 x i32> %1, <4 x i32> undef,
<4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
%3 = add <4 x i32> %2, %2
ret <4 x i32> %3
}