khchen added a comment. In D71387#1790413 <https://reviews.llvm.org/D71387#1790413>, @efriedma wrote:
> > But in RISCV clang emits the same IR for different ABI (-mabi), > > This is not true. For simple cases, it does, yes, but there are some weird > edge cases for functions with many arguments. It's interesting, I didn't find the edge cases for functions with many arguments. but you are right, I found a case when passing struct as argument, different `-mabi` will generate incompatible function interface. struct bar{ int a; float b; }; float foo(struct bar a, struct bar b){ ...} compiled with `-march=rv32imafc -mabi=ilp32f`: `define dso_local float @foo(i32 %0, float %1, i32 %2, float %3)` compiled with `-march=rv32imafc -mabi=-ilp32`: `define dso_local float @foo([2 x i32] %a.coerce, [2 x i32] %b.coerce) ` @efriedma thanks for your suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71387/new/ https://reviews.llvm.org/D71387 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits