[PATCH] D102310: [RISCV][CodeGen] Implement IR Intrinsic support for K extension

Shao-Ce SUN via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 19:40:17 PST 2022


achieveartificialintelligence added inline comments.


================
Comment at: llvm/include/llvm/IR/IntrinsicsRISCV.td:1506
+                [IntrNoMem, IntrSpeculatable, IntrWillReturn,
+                 ImmArg<ArgIndex<2>>, Returned<ArgIndex<0>>]>;
+
----------------
ksyx wrote:
> craig.topper wrote:
> > ksyx wrote:
> > > craig.topper wrote:
> > > > Why does this intrinsic have the Returned attribute?
> > > Maybe this is following the old 0.9.0 version that mixes the use of rs1/rd registers.
> > I see, but that was still a mistake. The Returned property means that the *value* passed into the argument is the *value* that is returned. Even if rd/rs1 are the same register, the operation still changes the value in that register.
> Thanks for pointing out this as I may misunderstood this while implementing.
Thanks! I've committed in `352e19c`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102310



More information about the llvm-commits mailing list