[flang-commits] [flang] [Flang][LoongArch] Add sign extension for i32 arguments and returns in function signatures. (PR #116146)
via flang-commits
flang-commits at lists.llvm.org
Thu Nov 14 01:10:21 PST 2024
================
@@ -1127,6 +1127,30 @@ struct TargetLoongArch64 : public GenericTarget<TargetLoongArch64> {
}
return marshal;
}
+
+ CodeGenSpecifics::Marshalling
+ integerArgumentType(mlir::Location loc,
+ mlir::IntegerType argTy) const override {
+ if (argTy.getWidth() == 32) {
+ // LA64 LP64D ABI requires unsigned 32 bit integers to be sign extended.
----------------
jeanPerier wrote:
The comment and PR talk about "unsigned 32 bit integers", but the check above only checks that this is a "32 bit integer", doesn't the "unsigned" aspect of `argTy` also needs to be checked somehow?
https://github.com/llvm/llvm-project/pull/116146
More information about the flang-commits
mailing list