[llvm] bf7f8d6 - [NFC][RFC][TableGen] Improve the comment about variable len encoder

via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 12 21:15:23 PST 2022


Author: Sheng
Date: 2022-02-13T13:15:17+08:00
New Revision: bf7f8d6fa6f460bf0a16ffec319cd71592216bf4

URL: https://github.com/llvm/llvm-project/commit/bf7f8d6fa6f460bf0a16ffec319cd71592216bf4
DIFF: https://github.com/llvm/llvm-project/commit/bf7f8d6fa6f460bf0a16ffec319cd71592216bf4.diff

LOG: [NFC][RFC][TableGen] Improve the comment about variable len encoder

When, for example, using "ascend" operator, I was wondering whether
the bit order of the dag argument will be reversed in ascend order
as well.

This patch clarifies it.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D119653

Added: 
    

Modified: 
    llvm/include/llvm/Target/Target.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Target/Target.td b/llvm/include/llvm/Target/Target.td
index 8e93a6e6fd6ab..f457e5e844097 100644
--- a/llvm/include/llvm/Target/Target.td
+++ b/llvm/include/llvm/Target/Target.td
@@ -758,15 +758,15 @@ def variable_ops;
 
 /// variable-length instruction encoding utilities.
 /// The `ascend` operator should be used like this:
-///     (ascend 0b0000, 0b1111)
+///     (ascend 0b0010, 0b1101)
 /// Which represent a seqence of encoding fragments placing from LSB to MSB.
-/// Thus, in this case the final encoding will be 0b11110000.
+/// Thus, in this case the final encoding will be 0b1101_0010.
 /// The arguments for `ascend` can either be `bits` or another DAG.
 def ascend;
 /// In addition, we can use `descend` to describe an encoding that places
 /// its arguments (i.e. encoding fragments) from MSB to LSB. For instance:
-///     (descend 0b0000, 0b1111)
-/// This results in an encoding of 0b00001111.
+///     (descend 0b0010, 0b1101)
+/// This results in an encoding of 0b0010_1101.
 def descend;
 /// The `operand` operator should be used like this:
 ///     (operand "$src", 4)


        


More information about the llvm-commits mailing list