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

Shao-Ce SUN via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 08:33:59 PDT 2023


sunshaoce added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoD.td:517
+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>;
----------------
jrtc27 wrote:
> liaolucy wrote:
> > 
> > We might add def simm12_sub4, the range is [-2048,2023]. Then replace simm12  with simm12_sub4.
> That doesn’t help you, globals etc are still broken.
Can this code test `globals`?
```
double d = 42;
void foo(char *p) { *(double *)(p + 0x7fc) = d; }
```


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