[PATCH] D65497: [RISCV] Generate extensions for RV64 when lowering LibCall with i32 type

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 11:03:34 PDT 2019


efriedma added a comment.

I don't think there's any way to define shouldSignExtendTypeInLibCall that completely solves the issue without target-independent changes.  Yes, it's true that floats should not be zero-extended, but they also shouldn't be sign-extended.  So makeLibCall should do something equivalent to `.setSExtResult(false).setZExtResult(false)` for the result, and `Entry.IsSExt = false; Entry.IsZExt = false;` for the arguments.  And this needs to apply only to float arguments/results; integer arguments and results need to be sign-extended from 32 bits to 64 bits.  (Not sure we currently generate any libcalls with 32-bit arguments/results on RV64, but that could change in the future.)

You might need to pass more information into TargetLowering::makeLibCall, or add a new entry point.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65497





More information about the llvm-commits mailing list