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

Jiahan Xie via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 05:55:14 PST 2023


jiahanxie353 wrote:

Seems like I don't need to implement all the `ValueMapping` for some reason, is this because `selectImpl` is working out-of-the-box?

The [test results here](https://github.com/llvm/llvm-project/blob/d797bfab89533794e96306fafd8cbe49d5296353/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv/add-rv32.mir#L6) looks reasonable to me, but 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 */`.

Please let me know what you think

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


More information about the llvm-commits mailing list