[llvm] [RISCV][GISel] Instruction select for vector G_ADD, G_SUB (PR #74114)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 09:21:49 PST 2023


michaelmaitland wrote:

> I don't understand the -1, 3 /* e8 */, 3 part in ; RV32I-NEXT: [[PseudoVADD_VV_MF8_:%[0-9]+]]:vr = PseudoVADD_VV_MF8 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */.

The `VPseudoBinaryNoMaskTU` class in RISCVInstrInfoVPseudos.td specifies a list of `ins` operands. There are operands `sew` and `policy` which are immediate values. the `3 /* e8 */` is the `sew` operand and `3 /* ta, ma */` is the policy operand. 3 is the log2 encoding for e8. 3 is the encoding for a `ta, ma` policy. The comments are added by the emitter to help the reader since they may not have memorized the encodings.

https://github.com/llvm/llvm-project/pull/74114


More information about the llvm-commits mailing list