[PATCH] D104245: [GlobalISel] Describe undefined values for G_SBFX/G_UBFX operands

Brendon Cahoon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 24 06:44:39 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG927b80978345: [GlobalISel] Describe undefined values for G_SBFX/G_UBFX operands (authored by bcahoon).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104245/new/

https://reviews.llvm.org/D104245

Files:
  llvm/docs/GlobalISel/GenericOpcode.rst
  llvm/include/llvm/Target/GenericOpcodes.td


Index: llvm/include/llvm/Target/GenericOpcodes.td
===================================================================
--- llvm/include/llvm/Target/GenericOpcodes.td
+++ llvm/include/llvm/Target/GenericOpcodes.td
@@ -1379,14 +1379,16 @@
 // 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);
Index: llvm/docs/GlobalISel/GenericOpcode.rst
===================================================================
--- llvm/docs/GlobalISel/GenericOpcode.rst
+++ llvm/docs/GlobalISel/GenericOpcode.rst
@@ -252,6 +252,12 @@
 - 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104245.354240.patch
Type: text/x-patch
Size: 1602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210624/ecda5651/attachment.bin>


More information about the llvm-commits mailing list