[PATCH] D149743: [RISCV][CodeGen] Support Zdinx on RV32 codegen

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 20:10:11 PDT 2023


liaolucy added a comment.

In D149743#4323730 <https://reviews.llvm.org/D149743#4323730>, @craig.topper wrote:

> In D149743#4323729 <https://reviews.llvm.org/D149743#4323729>, @liaolucy wrote:
>
>> Maybe we shouldn't expand the Pseudo in RISCVExpandPseudoInsts.cpp.
>> It seems that one more MI would get the following error.
>>
>>   llc: /home/liaochunyu/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:83: virtual bool (anonymous namespace)::RISCVExpandPseudo::runOnMachineFunction(llvm::MachineFunction &): Assertion `OldSize >= NewSize' failed.
>
> That error means you're missing a `let Size = 8` on the pseudo in tablegen.

Here, it looks like there is

  let isCall = 0, mayLoad = 1, mayStore = 0, Size = 8, isCodeGenOnly = 1 in
  def PseudoRV32ZdinxLD : Pseudo<(outs GPRPF64:$dst), (ins GPR:$rs1, simm12:$imm12), []>;
  defm : LdPat<load, PseudoRV32ZdinxLD, f64>;
  
  /// Stores
  let isCall = 0, mayLoad = 0, mayStore = 1, Size = 8, isCodeGenOnly = 1 in
  def PseudoRV32ZdinxSD : Pseudo<(outs), (ins GPRPF64:$rs2, GPR:$rs1, simm12:$imm12), []>;
  defm : StPat<store, PseudoRV32ZdinxSD, GPRPF64, f64>;




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149743



More information about the llvm-commits mailing list