1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[GlobalISel] Describe undefined values for G_SBFX/G_UBFX operands

Differential Revision: https://reviews.llvm.org/D104245
This commit is contained in:
Brendon Cahoon 2021-06-14 13:10:50 -04:00
parent e88759a828
commit 5e0256758b
2 changed files with 10 additions and 2 deletions

View File

@ -252,6 +252,12 @@ The source operands are registers as follows:
- The least-significant bit for the extraction
- The width of the extraction
The least-significant bit (lsb) and width operands are in the range:
::
0 <= lsb < lsb + width <= source bitwidth, where all values are unsigned
G_SBFX sign-extends the result, while G_UBFX zero-extends the result.
.. code-block:: none

View File

@ -1379,14 +1379,16 @@ def G_BZERO : GenericInstruction {
// Bitfield extraction.
//------------------------------------------------------------------------------
// Generic signed bitfield extraction.
// Generic signed bitfield extraction. The operands are in the range
// 0 <= lsb < lsb + width <= src bitwidth, where all values are unsigned.
def G_SBFX : GenericInstruction {
let OutOperandList = (outs type0:$dst);
let InOperandList = (ins type0:$src, type1:$lsb, type1:$width);
let hasSideEffects = false;
}
// Generic unsigned bitfield extraction.
// Generic unsigned bitfield extraction. The operands are in the range
// 0 <= lsb < lsb + width <= src bitwidth, where all values are unsigned.
def G_UBFX : GenericInstruction {
let OutOperandList = (outs type0:$dst);
let InOperandList = (ins type0:$src, type1:$lsb, type1:$width);