1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/WebAssembly/simd-nested-shuffles.ll
Thomas Lively 0bec287616 [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

llvm-svn: 345221
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
}