<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/WebAssembly/switch.ll, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[WebAssembly] Fixed 64-bit indices in br_table</title>
<updated>2020-07-30T17:52:16+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2020-07-27T21:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce1eb7af9dc1fb1c4167fa21824bda7dcf92bbce'/>
<id>ce1eb7af9dc1fb1c4167fa21824bda7dcf92bbce</id>
<content type='text'>
LLVM selection dag assumes "switch" indices are pointer sized, which causes problems for our 32-bit br_table. The new function ensures 32-bit operands don't get unnecessarily extended, and 64-bit operands get truncated.

Note that the changes to the existing test test exactly that: the addition of -NEXT in 2 places ensures no extension is inserted (which the test previously ignored) and that the wrap is present (previously omitted in wasm64 mode).

Differential Revision: https://reviews.llvm.org/D84705
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM selection dag assumes "switch" indices are pointer sized, which causes problems for our 32-bit br_table. The new function ensures 32-bit operands don't get unnecessarily extended, and 64-bit operands get truncated.

Note that the changes to the existing test test exactly that: the addition of -NEXT in 2 places ensures no extension is inserted (which the test previously ignored) and that the wrap is present (previously omitted in wasm64 mode).

Differential Revision: https://reviews.llvm.org/D84705
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Do not omit range checks for i64 switches</title>
<updated>2020-07-04T00:15:39+00:00</updated>
<author>
<name>Thomas Lively</name>
<email>tlively@google.com</email>
</author>
<published>2020-07-04T00:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8df30d988e9e595fa9883706198aec23b2e6d227'/>
<id>8df30d988e9e595fa9883706198aec23b2e6d227</id>
<content type='text'>
Summary:
Since the br_table instruction takes an i32, switches over i64s (and
larger integers) must use the i32.wrap_i64 instruction to truncate the
table index. This truncation makes numbers just over 2^32
indistinguishable from small numbers, so it was a miscompilation to
omit the range check preceding these br_tables. This change fixes the
problem by skipping the "fixing" of the br_table when the range check
is an i64 instruction.

Fixes PR46447.

Reviewers: aheejin, dschuff, kripken

Reviewed By: kripken

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83017
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Since the br_table instruction takes an i32, switches over i64s (and
larger integers) must use the i32.wrap_i64 instruction to truncate the
table index. This truncation makes numbers just over 2^32
indistinguishable from small numbers, so it was a miscompilation to
omit the range check preceding these br_tables. This change fixes the
problem by skipping the "fixing" of the br_table when the range check
is an i64 instruction.

Fixes PR46447.

Reviewers: aheejin, dschuff, kripken

Reviewed By: kripken

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83017
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[WebAssembly] Eliminate range checks on br_tables"</title>
<updated>2020-06-03T21:04:59+00:00</updated>
<author>
<name>Thomas Lively</name>
<email>tlively@google.com</email>
</author>
<published>2020-06-03T21:04:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7f50c15be5c020b2789f83dc3c87d28f8294664f'/>
<id>7f50c15be5c020b2789f83dc3c87d28f8294664f</id>
<content type='text'>
This reverts commit 755a89591528b692315ad0325347e2fd4637271b.
Although I was not able to reproduce any test failures locally,
aheejin was able to reproduce them and found a fix, applied here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 755a89591528b692315ad0325347e2fd4637271b.
Although I was not able to reproduce any test failures locally,
aheejin was able to reproduce them and found a fix, applied here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[WebAssembly] Eliminate range checks on br_tables"</title>
<updated>2020-06-03T08:26:53+00:00</updated>
<author>
<name>Thomas Lively</name>
<email>tlively@google.com</email>
</author>
<published>2020-06-03T08:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=755a89591528b692315ad0325347e2fd4637271b'/>
<id>755a89591528b692315ad0325347e2fd4637271b</id>
<content type='text'>
This reverts commit f99d5f8c32a822580a732d15a34e8197da55d22b.
The change was causing UBSan and other failures on some bots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f99d5f8c32a822580a732d15a34e8197da55d22b.
The change was causing UBSan and other failures on some bots.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Eliminate range checks on br_tables</title>
<updated>2020-06-02T20:14:27+00:00</updated>
<author>
<name>Thomas Lively</name>
<email>tlively@google.com</email>
</author>
<published>2020-06-02T20:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f99d5f8c32a822580a732d15a34e8197da55d22b'/>
<id>f99d5f8c32a822580a732d15a34e8197da55d22b</id>
<content type='text'>
Summary:
Jump tables for most targets cannot handle out of range indices by
themselves, so LLVM emits range checks to guard the jump
tables. WebAssembly, on the other hand, implements jump tables using
the br_table instruction, which takes a default branch target as an
operand, making the range checks redundant. This patch introduces a
new MachineFunction pass in the WebAssembly backend to find and
eliminate the redundant range checks.

Reviewers: aheejin, dschuff

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80863
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Jump tables for most targets cannot handle out of range indices by
themselves, so LLVM emits range checks to guard the jump
tables. WebAssembly, on the other hand, implements jump tables using
the br_table instruction, which takes a default branch target as an
operand, making the range checks redundant. This patch introduces a
new MachineFunction pass in the WebAssembly backend to find and
eliminate the redundant range checks.

Reviewers: aheejin, dschuff

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80863
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Make LBB markers not affected by test order</title>
<updated>2019-04-23T21:17:03+00:00</updated>
<author>
<name>Heejin Ahn</name>
<email>aheejin@gmail.com</email>
</author>
<published>2019-04-23T21:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ace7a086ca38738385b84d72b8e2df57ee14bf43'/>
<id>ace7a086ca38738385b84d72b8e2df57ee14bf43</id>
<content type='text'>
Summary:
This way we can change the order of tests or delete some of them without
affecting tests for other functions.

Reviewers: tlively

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

Tags: #llvm

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

llvm-svn: 359036
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This way we can change the order of tests or delete some of them without
affecting tests for other functions.

Reviewers: tlively

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

Tags: #llvm

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

llvm-svn: 359036
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Update CodeGen test expectations after rL354697. NFC</title>
<updated>2019-02-23T00:07:39+00:00</updated>
<author>
<name>Sam Clegg</name>
<email>sbc@chromium.org</email>
</author>
<published>2019-02-23T00:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=275d15ecf3476b7f884174e1c85f4894fb815bf1'/>
<id>275d15ecf3476b7f884174e1c85f4894fb815bf1</id>
<content type='text'>
llvm-svn: 354705
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 354705
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Added default stack-only instruction mode for MC.</title>
<updated>2018-08-27T15:45:51+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2018-08-27T15:45:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a9cb242fb1a5fef9103a6df15d601ede83dba0b'/>
<id>8a9cb242fb1a5fef9103a6df15d601ede83dba0b</id>
<content type='text'>
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

llvm-svn: 340750
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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

llvm-svn: 340750
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[WebAssembly] Added default stack-only instruction mode for MC."</title>
<updated>2018-08-13T23:12:49+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2018-08-13T23:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a7be375586bad56f4fc15da1fe1759deabef1ff6'/>
<id>a7be375586bad56f4fc15da1fe1759deabef1ff6</id>
<content type='text'>
This reverts commit 917a99b71ce21c975be7bfbf66f4040f965d9f3c.

llvm-svn: 339630
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 917a99b71ce21c975be7bfbf66f4040f965d9f3c.

llvm-svn: 339630
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Added default stack-only instruction mode for MC.</title>
<updated>2018-08-10T21:32:47+00:00</updated>
<author>
<name>Wouter van Oortmerssen</name>
<email>aardappel@gmail.com</email>
</author>
<published>2018-08-10T21:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab26bd06476b67a78123774b8d9a1898c346cde8'/>
<id>ab26bd06476b67a78123774b8d9a1898c346cde8</id>
<content type='text'>
Summary:
Moved Explicit Locals pass to last.
Made that pass obligatory.
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: jfb, llvm-commits, aheejin, eraman, jgravelle-google, sbc100

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

llvm-svn: 339474
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Moved Explicit Locals pass to last.
Made that pass obligatory.
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: jfb, llvm-commits, aheejin, eraman, jgravelle-google, sbc100

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

llvm-svn: 339474
</pre>
</div>
</content>
</entry>
</feed>
