Files
llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll
T
Thomas Lively 409b1027e9 [WebAssembly] Retain shuffle types during custom lowering
Summary:
Changing the node type in lowering was violating assumptions made in
the DAG combiner, so don't change the node type any more. This fixes
one of the issues reported in bug 39275.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits, alexcrichton

Differential Revision: https://reviews.llvm.org/D53537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345221 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 23:27:40 +00:00

18 lines
591 B
LLVM

; RUN: llc < %s -mattr=+simd128 | 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: v8x16.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
}