[PATCH] D155071: [RISCV] Fold vmerge into its ops with smaller VL if known

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 17:37:24 PDT 2023


fakepaper56 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:3319
+      return LHS;
+    if (auto *CLHS = dyn_cast<ConstantSDNode>(LHS),
+        *CRHS = dyn_cast<ConstantSDNode>(RHS);
----------------
Is the below code more concise?
```
if (auto *CLHS = dyn_cast<ConstantSDNode>(LHS))
  if (auto *CRHS = dyn_cast<ConstantSDNode>(RHS))
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155071



More information about the llvm-commits mailing list