[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. asavonic added reviewers: rjmccall, dmgreen, t.p.northover, ostannard, sdesmalen, momchil.velikov, SjoerdMeijer. Herald added subscribers: mstorsjo, danielkiss, kristof.beyls. asavonic requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added inline comments. Comment at: clang/test/CodeGen/arm64-arguments.c:53 -// CHECK: define{{.*}} i64 @f12() +// CHECK: define{{.*}} i24 @f11_packed() +struct s11_packed { char c; short s } __attribute__((packed)); I'm not sure if `i24` here is a prob

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. I think the right thing to do here is to recognize generally that we're emitting a mandatory tail call, and so suppress *all* the normal transformations on the return value. The conditions on mandatory tail calls should make that possible, and it seems like it w

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In D100591#2692599 , @rjmccall wrote: > I think the right thing to do here is to recognize generally that we're > emitting a mandatory tail call, and so suppress *all* the normal > transformations on the return value. I assume

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D100591#2692978 , @asavonic wrote: > In D100591#2692599 , @rjmccall > wrote: > >> I think the right thing to do here is to recognize generally that we're >> emitting a mandatory tail

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-22 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. Ping. Please let me know if the patch is acceptable for AArch64, or something else should be done to avoid overhead from rounding of return values. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100591/new/ https://reviews

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-23 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. On big-endian targets the rounding up to 64-bits (specified in the AAPCS) is significant; it means that structs get passed in the high bits of `x0` rather than low. E.g. https://godbolt.org/z/6v36oexsW. I think this patch would break that. Repository: rG LLVM

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In D100591#2711433 , @t.p.northover wrote: > On big-endian targets the rounding up to 64-bits (specified in the AAPCS) is > significant; it means that structs get passed in the high bits of `x0` rather > than low. E.g. https:/

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 340517. asavonic added a comment. Keep rounding of return values for big-endian targets. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100591/new/ https://reviews.llvm.org/D100591 Files: clang/lib/CodeGen/T

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-27 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover accepted this revision. t.p.northover added a comment. This revision is now accepted and ready to land. Thanks for updating it. A little disappointing that we can't support BE first-class, but much more important that it's not broken and it's not actually that common. So I think th

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-05-04 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb451ecd86e13: [Clang][AArch64] Disable rounding of return values for AArch64 (authored by asavonic). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100591/new