llvm-project
f2d853ff - [RISCV][P-ext] Promote i32 sati/usati intrinsics to i64 on RV64. (#234346)

Commit
5 days ago
[RISCV][P-ext] Promote i32 sati/usati intrinsics to i64 on RV64. (#234346) Instead of using p(u)sati.w. The trade off here is that p(u)sati.w sometimes requires its output to be sign extended for ABI or compares. While sati/usati sometimes requires its input to be sign extended if it isn't a W instruction or an argument/return with the signext attribute. The sign extended input is what we would get a from a manually written clamp pattern in C code. So there's an argument for consistency. It might be possible to have RISCVOptWInstrs convert to p(u)sati.w if we aren't able to remove the sext.w from the input and only the lower 32 bits of the result are used.
Author
Parents
Loading