13 Commits

Author SHA1 Message Date
Thomas Lively
f4a23c6776 [WebAssembly][NFC] Generalize operand numbers in SIMD tests
Reviewers: aheejin, dschuff

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342303 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-15 01:12:48 +00:00
Thomas Lively
53fdce9a56 [WebAssembly][NFC] Move SIMD encoding tests to dedicated file
Summary:
This change makes the tests more focused and avoids problematic
interactions between the testing modes and instruction encoding. This
change also allows the other tests to use less verbose output and
stricter checks.

Reviewers: aheejin, dschuff, aardappel

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342287 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-14 21:21:42 +00:00
Thomas Lively
16a4c18a23 [WebAssembly] v8x16.shuffle
Summary:
Since the shuffle mask is not exposed as an operand in the native ISel
DAG, create a new WebAssembly ISD node exposing the mask. The mask is
lowered as sixteen immediate byte indices no matter what type the
original vector shuffle was operating on.

This CL depends on D51656

Reviewers: aheejin, dschuff

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341718 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 21:54:46 +00:00
Thomas Lively
e49253c0c1 [WebAssembly][NFC] Add colon to label in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341414 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 21:51:32 +00:00
Thomas Lively
c5f4b48f16 [WebAssembly][NFC] Fix formatting and tests
Summary: Small fixes

Reviewers: aheejin, dschuff

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341411 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 21:26:17 +00:00
Wouter van Oortmerssen
a26aa42625 [WebAssembly] Added default stack-only instruction mode for MC.
Summary:
Made it convert from register to stack based instructions, and removed the registers.
Fixes to related code that was expecting register based instructions.
Added the correct testing flag to all tests, depending on what the
format they were expecting so far.
Translated one test to stack format as example: reg-stackify-stack.ll

tested:
llvm-lit -v `find test -name WebAssembly`
unittests/MC/*

Reviewers: dschuff, sunfish

Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340750 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 15:45:51 +00:00
Thomas Lively
d4a902bc71 [WebAssembly] Prioritize splats over v128.consts
Summary:
Splats are fewer bytes than v128.consts, so use them when either could
apply.

Reviewers: aheejin, dschuff

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340569 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-23 19:23:13 +00:00
Thomas Lively
f0aaf6f525 [WebAssembly] Arbitrary BUILD_VECTOR and remove i64x2.mul
Summary:
This CL adds support for arbitrary BUILD_VECTORS, i.e. not splats and
not consts. This is the last feature needed to properly lower v2i64
multiplies without a i64x2.mul instruction (which is not in the spec),
so i64x2.mul is removed as well.

Reviewers: aheejin, dschuff

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

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

Remove unnecessary condition and fix whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340472 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 23:06:27 +00:00
Thomas Lively
06d8a912fa [WebAssembly] v128.const
Summary:
This CL implements v128.const for each vector type. New operand types
are added to ensure the vector contents can be serialized without LEB
encoding. Tests are added for instruction selection, encoding,
assembly and disassembly.

Reviewers: aheejin, dschuff, aardappel

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340336 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 21:03:18 +00:00
Derek Schuff
ffcf104706 [WebAssembly] SIMD replace_lane
Implement and test replace_lane instructions.

Patch by Thomas Lively

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339786 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 16:18:51 +00:00
Derek Schuff
34c8f3ddba [WebAssembly] SIMD Splats
Implement and test SIMD splat ops.

Patch by Thomas Lively

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339744 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 00:30:27 +00:00
Heejin Ahn
35b8f4b065 [WebAssembly] SIMD encoding tests
Modifies existing SIMD tests to also check that SIMD instructions are
lowered to the expected bytes. This CL depends on D50597.

Reviewers: aheejin

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

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

Patch by Thomas Lively (tlively)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339712 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-14 19:10:50 +00:00
Heejin Ahn
95688ee84c [WebAssembly] SIMD extract_lane
Implement instruction selection for all versions of the extract_lane
instruction. Use explicit sext/zext to differentiate between
extract_lane_s and extract_lane_u for applicable types, otherwise
default to extract_lane_u.

Reviewers: aheejin

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

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

Patch by Thomas Lively (tlively)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339707 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-14 18:53:27 +00:00