yaxunl added a comment. In D98143#3034419 <https://reviews.llvm.org/D98143#3034419>, @tra wrote:
> Is this patch still relevant? Looks like I've missed it. > > What exactly is the difference between gcc and clang regarding fp16 and why > does it matter for aggregate arguments? > On a trivial example both clang and gcc appear to treat _Float16 similarly: > https://godbolt.org/z/8WxK95zTj On gcc11 and below, since gcc does not support fp16, it is common practice to use short to pass fp16 in struct. Then gcc and clang has different ABI: https://godbolt.org/z/zqhT7x7qo Basically if one compiles a function with struct type arg containing _Float16 with clang, then compiles a caller with struct type arg containing short with gcc, it will not work. If use gcc trunk with _Float16, then there will not be such issue since the ABI is the same. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98143/new/ https://reviews.llvm.org/D98143 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits