khchen marked an inline comment as done.
khchen added inline comments.
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:700
+for (auto Idx : CTypeOrder) {
+ if (Seen.count(Idx))
+PrintFatalError(
craig.topper wrote:
> You can use
>
> ```
> if
craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.
LGTM other than that one comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98388/new/
https://reviews.llvm.org/D98388
craig.topper added inline comments.
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:700
+for (auto Idx : CTypeOrder) {
+ if (Seen.count(Idx))
+PrintFatalError(
You can use
```
if (!Seen.insert(Idx).second)
PrintFatalError
```
This avoids w
khchen added inline comments.
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:687
+
+unsigned Skew = 0;
+if (HasMaskedOffOperand)
craig.topper wrote:
> ```
> unsigned Skew = HasMaskedOffOperand ? 1 : 0;
> ```
>
> unless this needs to get more complica
craig.topper added inline comments.
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:687
+
+unsigned Skew = 0;
+if (HasMaskedOffOperand)
```
unsigned Skew = HasMaskedOffOperand ? 1 : 0;
```
unless this needs to get more complicated in a future patch?
khchen marked 6 inline comments as done.
khchen added inline comments.
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:689
+ skew = 1;
+for (unsigned i = 0; i < PermuteOperands.size(); ++i) {
+ if (i != PermuteOperands[i])
rogfer01 wrote:
> These
craig.topper added inline comments.
Comment at: clang/include/clang/Basic/riscv_vector.td:225
+Ops[0] = Builder.CreateBitCast(Ops[0],
+llvm::PointerType::getUnqual(ResultType)); }],
+ ManualCodegenMask= [{
I think you can use ResultType->getP
rogfer01 added a comment.
Overall LGTM. Thanks @khchen!
Comment at: clang/include/clang/Basic/riscv_vector.td:175
+ // builtin to C/C++. It is parameter of the unmasked version without VL
+ // operand.
+ list PermuteOperands = [];
Not sure if we want to clar