[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-22 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 454705. SixWeining added a comment. Add a test for struct with zero size arrays. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132285/new/ https://reviews.llvm.org/D132285 Files: clang/lib/Basic/Targets/L

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-22 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D132285#3739568 , @xry111 wrote: > In D132285#3737855 , @SixWeining > wrote: > >> Ignore zero-width bit fields and add a test. > > Thanks! There is a GCC test (https://gcc.gnu.or

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-22 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added a comment. In D132285#3737855 , @SixWeining wrote: > Ignore zero-width bit fields and add a test. Thanks! There is a GCC test (https://gcc.gnu.org/r12-7951) which can be used to test if there is any ABI incompatibility between GCC and Cla

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-21 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 454276. SixWeining added a comment. Ignore zero-width bit fields and add a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132285/new/ https://reviews.llvm.org/D132285 Files: clang/lib/Basic/Targets/L

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D132285#3736922 , @xry111 wrote: > Are cases like > > struct x { double a; __int128 : 0; double b;}; > double f(struct x x) { return x.a + x.b; } > > handled properly? AFAIK RISC-V clang currently does not handle it cor

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-20 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added a comment. Are cases like struct x { double a; __int128 : 0; double b;}; double f(struct x x) { return x.a + x.b; } handled properly? AFAIK RISC-V clang currently does not handle it correctly: https://godbolt.org/z/rvM99zbqc (GCC handles it properly) https://godbolt.org/z/sWY5

[PATCH] D132285: [LoongArch] Implement ABI lowering

2022-08-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, MaskRay, xry111, wangleiat. Herald added subscribers: luke957, mstorsjo, StephenFan, luismarques, s.egerton, PkmX, simoncook, arichardson. Herald added a project: All. SixWeining requested review of this revision. Herald added su