Stream: git-wasmtime

Topic: wasmtime / PR #2749 cranelift: fix emit_small_memset and ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2021 at 23:26):

MaxGraey edited PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 06:38):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 06:38):

bjorn3 created PR Review Comment:

Could you keep using shift and bitor?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:01):

MaxGraey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:01):

MaxGraey created PR Review Comment:

Yes, sure!

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:04):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:07):

MaxGraey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:07):

MaxGraey created PR Review Comment:

But keep in mind LLVM can't optimize such series of shifts:
https://godbolt.org/z/nadxYq

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:09):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:11):

MaxGraey edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:14):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:20):

MaxGraey edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 07:21):

MaxGraey edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:06):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:24):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:24):

bjorn3 created PR Review Comment:

I assumed that shift and bitor would be faster than multiplying, but according to llvm-mca, multiplying is faster for 32bit and 64bit ints.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:32):

MaxGraey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:32):

MaxGraey created PR Review Comment:

I assumed that shift and bitor would be faster than multiplying, but according to llvm-mca, multiplying is faster for 32bit and 64bit ints.

No. 64-bit multiply will be always faster in this case. Even for 32-bit platforms.

btw trunk branck of LLVM already perform this optimization but still suboptimal. See:
https://godbolt.org/z/o3jfWv

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:36):

MaxGraey edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:49):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:49):

bjorn3 created PR Review Comment:

Ok. Could you please revert back to multiplying?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 08:51):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2021 at 15:03):

MaxGraey updated PR #2749 from fix-small-memset to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2021 at 18:07):

pchickey requested cfallin for a review on PR #2749.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2021 at 18:34):

cfallin submitted PR review.


Last updated: Dec 23 2024 at 12:05 UTC