[PATCH] D122743: [RISCV][VP] Add basic RVV codegen for vp.icmp

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 14:31:29 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:1081
+                     ISD::CondCode Cond, SDValue Mask, SDValue EVL) {
+    assert(LHS.getValueType().isVector() == RHS.getValueType().isVector() &&
+           "Cannot compare scalars to vectors");
----------------
This could be stricter. Everything needs to be a vector.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7513
+    Condition = getFCmpCondCode(CondCode);
+    auto *FPMO = dyn_cast<FPMathOperator>(&VPIntrin);
+    if ((FPMO && FPMO->hasNoNaNs()) || TM.Options.NoNaNsFPMath)
----------------
Is the vp.fcmp intrinsic considered an FPMathOperator or not? I wouldn't expect it to be dynamic. I'm guess it's not because it doesn't return an FP type which is what the dyn_cast is checking


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122743



More information about the llvm-commits mailing list