diff options
author | Thomas Lively <tlively@google.com> | 2018-10-24 23:27:40 +0000 |
---|---|---|
committer | Thomas Lively <tlively@google.com> | 2018-10-24 23:27:40 +0000 |
commit | ed9513472c111f6bbf1e34d33a4b5b45aa3c8d76 (patch) | |
tree | c5990b5593f38d32790cdbfe2b96fda9a93e640c /llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll | |
parent | 22602a49800142625a094d31db9e511a6c26f494 (diff) | |
download | bcm5719-llvm-ed9513472c111f6bbf1e34d33a4b5b45aa3c8d76.tar.gz bcm5719-llvm-ed9513472c111f6bbf1e34d33a4b5b45aa3c8d76.zip |
[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
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll')
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll b/llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll new file mode 100644 index 00000000000..51ba5a99be6 --- /dev/null +++ b/llvm/test/CodeGen/WebAssembly/simd-nested-shuffles.ll @@ -0,0 +1,17 @@ +; 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 +} |