[PATCH] D120302: [RISCV] DAG Combine vcpop and vfirst with VL=0 to li imm

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 16:30:28 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8516
+          IntNo == Intrinsic::riscv_vfirst_mask)
+        Imm = DAG.getConstant(-1, DL, VT);
+      return Imm;
----------------
No need for `Imm`. You can `return DAG.getConstant(-1, DL, VT);`


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8517
+        Imm = DAG.getConstant(-1, DL, VT);
+      return Imm;
+    }
----------------
No need for `Imm`. You can `return DAG.getConstant(0, DL, VT);`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120302



More information about the llvm-commits mailing list