[PATCH] D103527: [Clang][RISCV] Implement vlseg and vlsegff.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 13:55:41 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:807
+      // intrinsic: (ptr, vl)
+      SmallVector<llvm::Value*, 2> Operands = {Ops[NF], Ops[NF + 1]};
+      llvm::Function *F = CGM.getIntrinsic(ID, IntrinsicTypes);
----------------
This can be a `llvm::Value Operands[] =` I think?


================
Comment at: clang/include/clang/Basic/riscv_vector.td:877
+      // intrinsic: (ptr, vl)
+      SmallVector<llvm::Value*, 2> Operands = {Ops[NF], Ops[NF + 2]};
+      Value *NewVL = Ops[NF + 1];
----------------
This can be a `llvm::Value Operands[] =` I think?


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:441
   BuiltinStr = "q" + utostr(Scale.getValue()) + BuiltinStr;
+  // Point to vector types. Defined for Zvlsseg load intrinsics.
+  // Zvlsseg load intrinsics have pointer type arguments to store the loaded
----------------
Point->Pointer?


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:1120
+      }
+      if (HasMaskedOffOperand && NF > 1)
+        // Convert
----------------
Put curly braces around these if and else bodies since they contain a comment. The compiler doesn't need them but its more readable for humans and would be consistent with the standards documented here https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103527



More information about the cfe-commits mailing list