1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/unittests/CodeGen
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
..
GlobalISel [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
AArch64SelectionDAGTest.cpp Fix some signed/unsigned comparison gcc warnings from D87930 2020-10-24 12:51:51 +01:00
AllocationOrderTest.cpp [NFC][regalloc] Separate iteration from AllocationOrder 2020-10-05 16:13:18 -07:00
AsmPrinterDwarfTest.cpp [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
CMakeLists.txt [SelectionDAG] Avoid aliasing analysis if the object size is unknown. 2020-11-25 06:13:37 +08:00
DIEHashTest.cpp [DebugInfo] Simplify DIEInteger::SizeOf(). 2020-09-17 12:47:38 +07:00
DIETest.cpp [DebugInfo] Use a common method to determine a suitable form for section offsts (6/19). 2020-09-15 11:30:38 +07:00
LexicalScopesTest.cpp [docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to DILocation::get 2020-12-15 14:17:04 -08:00
LowLevelTypeTest.cpp Revert "GlobalISel: Make LLT constructors constexpr" 2020-06-17 15:31:12 +02:00
MachineInstrBundleIteratorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachineInstrTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
MachineOperandTest.cpp Revert "Revert "[MIR] Target specific MIR formating and parsing"" 2020-01-08 20:03:29 -08:00
MFCommon.inc [X86][MC][Target] Initial backend support a tune CPU to support -mtune 2020-08-14 15:31:50 -07:00
PassManagerTest.cpp Reland "Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager"" 2020-08-07 16:40:49 -07:00
ScalableVectorMVTsTest.cpp [SVE] Remove reliance on TypeSize comparison operators in unit tests 2020-10-21 08:05:55 +01:00
SelectionDAGAddressAnalysisTest.cpp [SelectionDAG] Don't pass a scalable vector to MachinePointerInfo::getWithOffset in a unit test. 2021-03-18 15:19:22 -07:00
TargetOptionsTest.cpp [unittests] Add InitializePasses.h includes 2019-11-13 19:42:58 -08:00
TestAsmPrinter.cpp [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19). 2020-09-15 11:29:48 +07:00
TestAsmPrinter.h [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
TypeTraitsTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00