craig.topper added inline comments.

================
Comment at: clang/include/clang/Basic/riscv_vector.td:1528
+
+      unsigned Offset = IsMasked ? 1 : 0;
+      llvm::Value *MaskOperand = IsMasked ? Ops[0] : nullptr;
----------------
I don't think we need the `Value *` variables here. They're only benefit is 
naming, but I think we can do that with comments.

Something like this

```
unsigned Offset = IsMasked ? 1 : 0;
Operands.push_back(Ops[Offset]); // Pointer
if (IsMasked)
  Operands.push_back(Ops[0]); // Mask
Operands.push_back(Ops[Offset + 1]); // VL
```


================
Comment at: clang/lib/AST/ASTContext.cpp:4090
+                                                unsigned NumElts,
+                                                unsigned NumFields) const {
+  if (Target->hasRISCVVTypes()) {
----------------
Would it be possible to add NumFields to getScalableVectorType maybe with a 
default value of 1 instead of introducing a new function?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147731

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to