pratlucas added a comment. > Why not just make half as an argument do the right thing for that case?
That would be the ideal approach, but currently there's a limitation on the backend's calling convention lowering that gets in the way. The lowering of calls in `SelectionDAGBuilder` includes a target-independent step that is responsible for spliting or promoting each argument into "legal registers" and takes place before the targets' calling convention lowering. As `f16` is not a legal type on many of the `AAPCS_VFP` targets, it gets promoted to `f32` before the target's lowering code has a chance to define how to handle it. Ideally, this stpe should only take place if lowering calling conventions after type legalization - there's a FIXME there already capturing that -, but that would involve a major rewriting that would impact multiple targets. Inserting a hacky target-dependent fix in this step also didn't look very good. Do you see other alternatives for handling it? If not, which approach would you suggest? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75169/new/ https://reviews.llvm.org/D75169 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits