diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-08-29 13:03:14 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-08-29 13:03:14 +0000 |
commit | 7a1202ed4580d12943142caaf251f1a387c00828 (patch) | |
tree | efc2ec8e94877ec4ea60e970e28116595d8c44e4 | |
parent | daa3f8fd98203acc930ee977fdfe7550f8b96105 (diff) | |
download | llvm-7a1202ed4580d12943142caaf251f1a387c00828.tar.gz |
ReleaseNotes: matching wide stores (r362472)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370352 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/ReleaseNotes.rst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index aa0dd9bb8e38..b9630087cb7e 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -85,6 +85,30 @@ Noteworthy optimizations `bug 42763 <https://bugs.llvm.org/show_bug.cgi?id=42763>_` and `post commit discussion <http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/646945.html>_`. +* LLVM will now pattern match wide scalar values stored by a succession of + narrow stores. For example, Clang will compile the following function that + writes a 32-bit value in big-endian order in a portable manner: + + .. code-block:: c + + void write32be(unsigned char *dst, uint32_t x) { + dst[0] = x >> 24; + dst[1] = x >> 16; + dst[2] = x >> 8; + dst[3] = x >> 0; + } + + into the x86_64 code below: + + .. code-block:: asm + + write32be: + bswap esi + mov dword ptr [rdi], esi + ret + + (The corresponding read patterns have been matched since LLVM 5.) + * LLVM will now omit range checks for jump tables when lowering switches with unreachable default destination. For example, the switch dispatch in the C++ code below |