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

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 00:14:44 PDT 2022


rogfer01 added inline comments.


================
Comment at: llvm/include/llvm/IR/VPIntrinsics.def:271
 // llvm.vp.icmp(x,y,cc,mask,vlen)
 BEGIN_REGISTER_VP(vp_icmp, 3, 4, VP_ICMP, -1)
 VP_PROPERTY_FUNCTIONAL_OPC(ICmp)
----------------
Now that we're at it, could we replace this block with the following one?

```lang=cpp
BEGIN_REGISTER_VP_INTRINSIC(vp_icmp, 3, 4)
VP_PROPERTY_FUNCTIONAL_OPC(ICmp)
VP_PROPERTY_CMP(2, false)
END_REGISTER_VP_INTRINSIC(vp_icmp)
```

Should be equivalent and avoids defining an unnecessary `ISD::VP_ICMP` which we are not going to use.

(A similar thing can be done for `VP_FCMP` but we can do that in the patch with the lowering)


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