1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Go to file
Jessica Paquette ae291b6dfb [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes)
There is a bunch of similar bitfield extraction code throughout *ISelDAGToDAG.

E.g, ARMISelDAGToDAG, AArch64ISelDAGToDAG, and AMDGPUISelDAGToDAG all contain
code that matches a bitfield extract from an and + right shift.

Rather than duplicating code in the same way, this adds two opcodes:

- G_UBFX (unsigned bitfield extract)
- G_SBFX (signed bitfield extract)

They work like this

```
%x = G_UBFX %y, %lsb, %width
```

Where `lsb` and `width` are

- The least-significant bit of the extraction
- The width of the extraction

This will extract `width` bits from `%y`, starting at `lsb`. G_UBFX zero-extends
the result, while G_SBFX sign-extends the result.

This should allow us to use the combiner to match the bitfield extraction
patterns rather than duplicating pattern-matching code in each target.

Differential Revision: https://reviews.llvm.org/D98464
2021-03-19 14:37:19 -07:00
benchmarks
bindings [OCaml] Handle nullptr in Llvm.global_initializer 2021-03-17 13:39:35 +00:00
cmake [cmake] Enable Clang warnings about redundant semicolons 2021-03-19 18:49:05 +02:00
docs [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
examples [ORC] Fix some comments in the LLJITWithObjectLinkingLayerPlugin example. 2021-03-12 19:13:42 -08:00
include [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
lib [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
projects llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
resources
runtimes [PR48898][CMake] Support MinGW Toolchain tool sin llvm_ExternalProject_Add 2021-03-02 22:45:05 +01:00
test [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
tools [llvm-readobj] Remove legacy GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} and dump new GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} 2021-03-19 14:35:22 -07:00
unittests [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
utils [SystemZ][z/OS] Distinguish between text and binary files on z/OS 2021-03-19 08:09:57 -04:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' 2020-07-07 14:53:45 +02:00
CMakeLists.txt [test] Add ability to get error messages from CMake for errc substitution 2021-03-15 20:56:08 +01:00
CODE_OWNERS.TXT [M68k][CODE_OWNERS](0/8) Add code owner for the M68k target 2021-03-08 12:30:56 -08:00
configure
CREDITS.TXT [NFC] Add contributors names to CREDITS.TXT 2020-10-07 13:22:55 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.