[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2023-06-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a subscriber: tuliom. qiucf added a comment. There's a glibc patch in review to fix the motivation error in math.h (thanks to @tuliom ): https://patchwork.sourceware.org/project/glibc/patch/20230613215633.3179708-1-tul...@ascii.art.br/ I think this

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-28 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D109751#3191148 , @hubert.reinterpretcast wrote: > In D109751#3178494 , @qiucf wrote: > >> Thanks for the reminder. Here GCC and Clang diverges in the handling of >>

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, fyi, have vacation until January. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 ___ cfe-commits mailing list

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3178494 , @qiucf wrote: > Thanks for the reminder. Here GCC and Clang diverges in the handling of > `__ibm128`/`__float128` and `long double`. Not sure whether GCC will 'fix' > the behavior, but here

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D109751#3168982 , @hubert.reinterpretcast wrote: > In D109751#3136543 , @qiucf wrote: > >> Because the piece of code will be expanded to: >> >> long double _Complex x; >> >> if

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 392638. qiucf marked 5 inline comments as done. qiucf added a comment. Update some cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 Files:

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1540 // Diagnose attempts to convert between __ibm128, __float128 and long double - // where such conversions currently can't be handled. + // in arithmetic or comparison. if

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3136543 , @qiucf wrote: > Because the piece of code will be expanded to: > > long double _Complex x; > > if ((__builtin_types_compatible_p(__typeof(creall(x)), _Float128) >?

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-17 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 387851. qiucf marked an inline comment as done. qiucf added a comment. Fix C++ tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 Files:

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 387819. qiucf added a comment. Disallow conversion in compound and conditional CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/lib/Sema/SemaExpr.cpp

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D109751#3131169 , @nemanjai wrote: > Please provide a description for this patch which includes justification for > why we want to allow conversion between the two types. > I am of the impression that allowing the two types to

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-15 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai requested changes to this revision. nemanjai added a comment. This revision now requires changes to proceed. Please provide a description for this patch which includes justification for why we want to allow conversion between the two types. I am of the impression that allowing the two

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, I'm on vacation (for 3 weeks). For the C++ side, I suggest having a test for the narrowing conversion diagnostic in C++. My recollection is that GCC's odd behaviour around the conditional operator has an analogue in its implementation of

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. It doesn't seem like the cases of implicit conversion that are expected to be allowed have been tested with C++? $ ./bin/clang -fsyntax-only -mcpu=pwr9 -mfloat128 -xc -<<<$'__ibm128 x; __float128 y; void f(void) { y = x; }' Return: 0x00:0 Tue Nov

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1542 + if (unsupportedTypeConversion(*this, LHSType, RHSType) && + ACK != ACK_Conditional && ACK != ACK_CompAssign) return QualType(); GCC does not allow compound

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 385709. qiucf marked an inline comment as done. qiucf added a comment. Restrict implicit conversion in arithmetic and comparison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/ibm128-cast.c:59 + // IEEE: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} + w + q; + // CHECK: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} It's controversial enough to consider, as

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-09-14 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: PowerPC, hubert.reinterpretcast, nemanjai, jsji. Herald added a subscriber: shchenz. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo