[PATCH] D107449: [RISCV] Improve codegen for shuffles with LHS/RHS splats

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 5 08:47:50 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1986
+      if (IsLHSOrUndefIndex && MaskIndex >= 0)
+        ++LHSIndexCounts.try_emplace(MaskIndex, 0).first->getSecond();
+      if (!IsLHSOrUndefIndex)
----------------
Can this just be

```
++LHSIndexCounts[MaskIndex]
```

It should default construct a 0 the first time it is accessed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107449



More information about the llvm-commits mailing list