[all-commits] [llvm/llvm-project] 41f166: [flang] Use correct int extension flags for C-ABI ...
Asher Mancinelli via All-commits
all-commits at lists.llvm.org
Fri Apr 25 06:58:17 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41f1663f118285e63eaf28c5156af3caa972644f
https://github.com/llvm/llvm-project/commit/41f1663f118285e63eaf28c5156af3caa972644f
Author: Asher Mancinelli <ashermancinelli at gmail.com>
Date: 2025-04-25 (Fri, 25 Apr 2025)
Changed paths:
M flang/lib/Optimizer/CodeGen/Target.cpp
M flang/test/Fir/convert-to-llvm-target.fir
M flang/test/Fir/target-rewrite-integer.fir
Log Message:
-----------
[flang] Use correct int extension flags for C-ABI calls on aarch64 (#137105)
The AArch64 procedure call standard does not mandate that the callee
extends the return value. Clang does not add signext to functions
returning i8 or i16 on linux aarch64, but flang does.
This means that runtime routines returning i8's will have signext on the
callsite/declaration, but not on the implementation, and the call site
will assume the return value has already been sign extended when it has
not. This showed up in a test case calling MINVAL on an array of
INTEGER*1.
Adjust our integer extension flags to match clang and aarch64pcs on
linux. The behavior on Darwin should be preserved. This is listed on the
apple developer guide as a divergence from aarch64pcs.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list