[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 clan

[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: clang/lib/CodeGen/CGExprSc

[PATCH] D114569: [PowerPC] Require htm feature for HTM builtins

2021-11-24 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, jsji, kbarton, PowerPC. 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 https://reviews.llvm.org/

[PATCH] D114937: [PowerPC] [Clang] Fix alignment adjustment of single-elemented float128

2021-12-02 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: jsji, nemanjai, rjmccall, shchenz, PowerPC, hubert.reinterpretcast. Herald added a subscriber: kbarton. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This does similar thing to D9

[PATCH] D112401: [Clang] Mutate printf bulitin names under IEEE128 on PPC64

2021-12-03 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4f94c0261602: [Clang] Mutate bulitin names under IEEE128 on PPC64 (authored by qiucf). Changed prior to commit: https://reviews.llvm.org/D112401?v

[PATCH] D114937: [PowerPC] [Clang] Fix alignment adjustment of single-elemented float128

2021-12-03 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb9adaa1782db: [PowerPC] [Clang] Fix alignment adjustment of single-elemented float128 (authored by qiucf). Changed prior to commit: https://review

[PATCH] D139507: [Intrinsic] Rename flt.rounds intrinsic to get.rounding

2022-12-18 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa40ef656d812: [Intrinsic] Rename flt.rounds intrinsic to get.rounding (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D137536: [NFC] Replace use of PPC64 macro into powerpc64 in intrinsic headers

2022-11-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, lkail, shchenz, PowerPC. Herald added a subscriber: kbarton. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monor

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: aaron.ballman, mibintc, andrew.w.kaylor, masoud.ataei, zahiraam. Herald added a project: All. qiucf requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. `-ffp-model=strict -ffp-model=f

[PATCH] D137536: [NFC] Replace use of PPC64 macro into powerpc64 in intrinsic headers

2022-11-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. I think rG7aa90b21b453d1ca52fdfccfd7e01e61d9e5b1f1 has already done that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 474142. qiucf marked an inline comment as done. qiucf added a reviewer: michele.scandale. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137618/new/ https://reviews.llvm.org/D137618 Files: clang/lib/Driver/ToolCh

[PATCH] D138105: [PowerPC] Support test data class intrinsic of 128-bit float

2022-11-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, shchenz, PowerPC, quinnp, stefanp. Herald added subscribers: kbarton, hiraditya. Herald added a project: All. qiucf requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commit

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 475981. qiucf marked an inline comment as done. qiucf added a comment. Update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137618/new/ https://reviews.llvm.org/D137618 Files: clang/lib/Driver/ToolCh

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3034 RoundingFPMath = false; + FPExceptionBehavior = ""; // If fast-math is set then set the fp-contract mode to fast. zahiraam wrote: > FPExceptionBehavior should

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-17 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf marked an inline comment as done. qiucf added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137618/new/ https://reviews.llvm.org/D137618 ___ cfe-commits mailing list cfe-commits@

[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

2022-11-17 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcab9c02bd97f: [Clang] Fix behavior of -ffp-model option when overriden (authored by qiucf). Changed prior to commit: https://reviews.llvm.org/D137618?vs=475981&id=476309#toc Repository: rG LLVM Githu

[PATCH] D126302: [PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float

2022-05-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:450 + // Cannot allow VSX with no Altivec. + if (llvm::is_contained(FeaturesVec, "-hard-float") && Comments in reverse order? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2023-09-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. Determining float ABI by system library without explicit options may cause confusion. Since Fedora has successfully switched using ieeelongdouble on ppc64le (https://developers.redhat.com/articles/2023/05/16/benefits-fedora-38-long-double-tr

[PATCH] D116016: [Clang] [PowerPC] Emit module flag for current float abi

2023-09-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Gentle ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116016/new/ https://reviews.llvm.org/D116016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D159159: [PowerPC] Disable float128 on AIX in Clang

2023-09-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. Migrated to https://github.com/llvm/llvm-project/pull/67298 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159159/new/ https://reviews.llvm.org/D159159 __

[PATCH] D158066: [PowerPC] Fix use of FPSCR builtins in smmintrin.h

2023-09-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf abandoned this revision. qiucf added a comment. Migrated to https://github.com/llvm/llvm-project/pull/67299 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158066/new/ https://reviews.llvm.org/D158066 __

[PATCH] D116016: [Clang] [PowerPC] Emit module flag for current float abi

2023-09-25 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e97db89ae8e: [PowerPC] Emit IR module flag for current float abi (authored by qiucf). Changed prior to commit: https://reviews.llvm.org/D116016?vs=530843&id=557298#toc Repository: rG LLVM Github Mon

[PATCH] D156076: [PowerPC][Clang] Remove constraint for initial-exec TLS mode on AIX

2023-07-23 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: stefanp, shchenz, amyk, tingwang, PowerPC. Herald added a subscriber: nemanjai. Herald added a reviewer: aaron.ballman. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D158065: [PowerPC] Implement builtin for mffsl

2023-08-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, stefanp, shchenz, PowerPC. Herald added subscribers: kbarton, hiraditya. Herald added a project: All. qiucf requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. `mff

[PATCH] D158066: [PowerPC] Fix use of FPSCR builtins in smmintrin.h

2023-08-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, shchenz, stefanp, PowerPC. Herald added a subscriber: kbarton. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `smmintrin.h` uses `__builtin_mf

[PATCH] D119407: [PowerPC] [Clang] Add SSE4 and BMI compatible intrinsics implementation for PowerPC

2023-08-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf marked 2 inline comments as done. qiucf added a comment. Thanks, fixed by rG2459ed67805c . `nmmintrin.h` just includes `smmintrin.h` so it's not critical. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158066: [PowerPC] Fix use of FPSCR builtins in smmintrin.h

2023-08-16 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added subscribers: quinnp, amyk. qiucf added a comment. CC @amyk @quinnp Any comments about the naming? I see some `__builtin_ppc_xxx` are aliased into `__builtin_xxx` by `defineXLCompatMacros`. But these are not XL-compatible builtins, and the macros do not always work. Repository: r

[PATCH] D158066: [PowerPC] Fix use of FPSCR builtins in smmintrin.h

2023-08-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D158066#4601785 , @nemanjai wrote: > It should be perfectly fine to provide pre-defined macros for these to match > GCC on PowerPC. The reason we went with the macro solution is to avoid > polluting the builtins namespace for o

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/Headers/altivec.h:14662 + vector unsigned char __res = + __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1); Could we just

[PATCH] D158484: [PowerPC][altivec] Correct modulo number of vec_promote on vector char

2023-08-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf accepted this revision as: qiucf. qiucf added a comment. This revision is now accepted and ready to land. Thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158484/new/ https://reviews.llvm.org/D158484

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2023-07-10 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Is there any blocker for this to land? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ https://reviews.llvm.org/D112932 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D159159: [PowerPC] Disable float128 on AIX in Clang

2023-08-29 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added a reviewer: PowerPC. Herald added subscribers: steven.zhang, shchenz, kbarton, nemanjai. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. PowerPC AIX backend does no

[PATCH] D156076: [PowerPC][Clang] Remove constraint for initial-exec TLS mode on AIX

2023-08-30 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156076/new/ https://reviews.llvm.org/D156076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D156076: [PowerPC][Clang] Remove constraint for initial-exec TLS mode on AIX

2023-09-04 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Revision". This revision was automatically updated to reflect the committed changes. Closed by commit rG880f39af6115: [Clang] Enable AIX initial-exec TLS mode (authored by qiucf). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D158065: [PowerPC] Implement builtin for mffsl

2023-09-04 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG082c5d7f63c4: [PowerPC] Implement builtin for mffsl (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158065/new/ https://reviews.llvm.org/

[PATCH] D158066: [PowerPC] Fix use of FPSCR builtins in smmintrin.h

2023-09-04 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 555805. qiucf added a comment. - Add macro alias to `mffs` `mffsl` `mtfsf` and `set_fpscr_rn`, although they don't work in freestanding mode - Add C++ run lines to intrinsics tests. To avoid further messing codegen checks, make them run under `-fsyntax-only`.

[PATCH] D138105: [PowerPC] Support test data class intrinsic of 128-bit float

2022-11-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 477375. qiucf added a comment. Change error message regarding `__float128`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138105/new/ https://reviews.llvm.org/D138105 Files: clang/include/clang/Basic/Diagnosti

[PATCH] D143479: [Clang] Emit error when caller cannot meet target feature requirement from always-inlining callee

2023-03-14 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG608212a0ff2f: [Clang] Check feature requirement from inlined callee (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143479/new/ https://r

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-03-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143467/new/ https://reviews.llvm.org/D143467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-03-09 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. > However, manually adding the required target feature seems a little > mistakable, like the one below. I guess we can not get the required feature > in the LLVM instruction TDs(if the builtin is mapped to a IR intrinsic and > the intrinsic is selected inside the instruct

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-03-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D143467#4182457 , @nemanjai wrote: > Another note regarding the motivating test case: > Use of `vector double` should require VSX. We don't really seem to have the > ability to turn this off early enough to catch this though. It

[PATCH] D143479: [Clang] Emit error when caller cannot meet target feature requirement from always-inlining callee

2023-03-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143479/new/ https://reviews.llvm.org/D143479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D143479: [Clang] Emit error when caller cannot meet target feature requirement from always-inlining callee

2023-04-05 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D143479#4243143 , @erichkeane wrote: > Based on GCC's behavior: https://godbolt.org/z/fxWzPTT9P I suspect our > behavior is consistent/correct now, and the 'regressions' are to be expected, > since GCC diagnoses the same thin

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-04-05 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/include/clang/Basic/BuiltinsPPC.def:444 +TARGET_BUILTIN(__builtin_altivec_vcmpnew_p, "iiV4iV4i", "", "power9-vector") +TARGET_BUILTIN(__builtin_altivec_vcmpned_p, "iiV2LLiV2LLi", "", "altivec") + maryammo wrote: > am

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-04-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-test.c:47 -int test_test_data_class_f() { -// CHECK-LABEL: @test_test_data_class_f -// CHECK: [[TMP:%.*]] = call i32 @llvm.ppc.test.data.class.f32(float %0, i32 127) -//

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-04-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D143467#4258380 , @kamaub wrote: > Sorry I should have requested changes before for this comment below, but I do > want these test moved to codegen and expanded, please let me know if anything > is unclear. > > In D143467#42416

[PATCH] D150087: [Clang] Support more stdio builtins

2023-05-23 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. qiucf marked an inline comment as done. Closed by commit rGbaeb85b5a997: [Clang] Support more stdio builtins (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D148490: [AIX] use system assembler for assembly files

2023-05-30 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf accepted this revision as: qiucf. qiucf added a comment. This revision is now accepted and ready to land. This looks reasonable to me, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148490/new/ https://reviews.llvm.org/D148490 ___

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-02-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, sfertile, amyk, shchenz, lkail, PowerPC. Herald added a subscriber: kbarton. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang has mechanis

[PATCH] D143479: [Clang] Emit error when caller cannot meet target feature requirement from always-inlining callee

2023-02-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: echristo, LiuChen3, erichkeane, GBuella. Herald added subscribers: steven.zhang, kbarton, nemanjai. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Curre

[PATCH] D143736: [PowerPC] Specify the dynamic loader prefix in ppc-float-abi-warning

2023-02-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf accepted this revision. qiucf added a comment. This revision is now accepted and ready to land. LGTM, thanks for catching this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143736/new/ https://reviews.llvm.org/D143736 __

[PATCH] D143736: [PowerPC] Specify the dynamic loader prefix in ppc-float-abi-warning

2023-02-13 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcb90bb986611: [PowerPC] Specify the dynamic loader prefix in ppc-float-abi-warning (authored by tuliom, committed by qiucf). Repository: rG LLVM G

[PATCH] D150087: [Clang] Support more stdio builtins

2023-05-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: nemanjai, craig.topper, PowerPC, tuliom, tstellar. Herald added a subscriber: kbarton. Herald added a project: All. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add more builtins

[PATCH] D150087: [Clang] Support more stdio builtins

2023-05-18 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 523305. qiucf marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150087/new/ https://reviews.llvm.org/D150087 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen/CGBuil

[PATCH] D150087: [Clang] Support more stdio builtins

2023-05-18 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf marked an inline comment as done. qiucf added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:109 + {Builtin::BI__builtin___vsnprintf_chk, "__vsnprintfieee128"}, + {Builtin::BI__builtin___vsprintf_chk, "__vsprintfieee128"}, + {Builtin::BI__builti

[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

2023-04-23 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Gentle ping .. @kamaub Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143467/new/ https://reviews.llvm.org/D143467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D148490: [AIX] use system assembler for assembly files

2023-04-24 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:427 + Assembler.reset(buildAssembler()); +return Assembler.get(); + } I saw we have a `ToolChain::getAssemble()` method. Can we use that directly? Comment at

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. It's necessary to check range of first argument in `SemaChecking.cpp` using `SemaBuiltinConstantArgRange`. _Bool check_isfpclass_1(float x) { return __builtin_isfpclass(123456, x); } // ICE int g; // error: cannot compile this builtin function yet // there's be

[PATCH] D149548: [IR] Update to use new shufflevector semantics

2023-06-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added subscribers: jonpa, uweigand. qiucf added a comment. Why this changes IR output of following case? // RUN: clang vecpromote.c -S -o - -O0 -target s390x-linux-gnu -fzvector -emit-llvm #include vector int si; int g; int i; void foo() { si = vec_promote(g, i); }

[PATCH] D116016: [Clang] [PowerPC] Emit module flag for current float abi

2023-06-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 530843. qiucf marked an inline comment as done. qiucf edited the summary of this revision. qiucf removed a reviewer: jsji. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116016/new/ https://reviews.llvm.org/D116016

[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 rev

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: andrew.w.kaylor, sepavloff, kpn, RKSimon, craig.topper, nemanjai, cameron.mcinally. Herald added subscribers: jeroen.dobbelaere, StephenFan, frasercrmck, jdoerfert, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, th

[PATCH] D138105: [PowerPC] Support test data class intrinsic of 128-bit float

2022-12-07 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG62f20f51ce39: [PowerPC] Support test data class intrinsic of 128-bit float (authored by qiucf). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-07 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D139507#3978449 , @sepavloff wrote: > Thank you for working on this! > > Is there any reason why we should keep the old intrinsic? In case any user outside of clang references it (although I believe no), we can deprecate it and

[PATCH] D112932: [WIP] Use llvm.is_fpclass to implement FP classification functions

2022-12-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Herald added a project: All. This patch looks good and `llvm.is.fpclass` will by default be expanded (except SystemZ which has their own lowering). Is there any blocker for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D139450: Warn about unsupported ibmlongdouble

2022-12-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Thanks for the patch! But does libc++ support to be built with `-mabi=ieeelongdouble` now? (like libstdc++, if it works correctly, it should co-exist and be linked with different long double ABIs) Comment at: clang/lib/Driver/ToolChains/PPCLinux.cpp:96

[PATCH] D139450: Warn about unsupported ibmlongdouble

2022-12-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/test/Driver/lit.local.cfg:26 +if config.ppc_linux_default_ieeelongdouble == "ON": + config.available_features.add('ppc_linux_default_ieeelongdouble') tuliom wrote: > qiucf wrote: > > Can we assume if we are compilin

[PATCH] D139507: [Intrinsic] Rename flt.rounds intrinsic to get.rounding

2022-12-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 482381. qiucf retitled this revision from "[Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes" to "[Intrinsic] Rename flt.rounds intrinsic to get.rounding". qiucf edited the summary of this revision. qiucf added a comment. Use Aut

[PATCH] D139450: Warn about unsupported ibmlongdouble

2022-12-13 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5f68c4111ab9: Warn about unsupported ibmlongdouble (authored by tuliom, committed by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139450/new/ https

[PATCH] D139450: Warn about unsupported ibmlongdouble

2022-12-13 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Committed as https://github.com/llvm/llvm-project/commit/5f68c4111ab9c79b902723df3986dd1033813c01 `ppc-float-abi-warning.cpp` would fail when testing on machine with glibc older than 2.32 but `PPC_LINUX_DEFAULT_IEEELONGDOUBLE` enabled, which is known failure even before

[PATCH] D139507: [Intrinsic] Rename flt.rounds intrinsic to get.rounding

2022-12-15 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 483434. qiucf marked 3 inline comments as done. qiucf removed a reviewer: libc++abi. qiucf removed a project: libc++abi. qiucf removed a subscriber: libcxx-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1395

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-01-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D116015#3203067 , @nemanjai wrote: > Converting more generic code to target-specific intrinsics is sometimes > necessary to ensure the generic IR doesn't get transformed in a way that is > disadvantageous. I believe that the de

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-23 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 402405. qiucf marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112906/new/ https://reviews.llvm.org/D112906 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Dr

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-23 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc5590396d041: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-24 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D117181#3262288 , @jsji wrote: >> Won't that end up producing a warning on ALL code built on any Linux distro >> with a GCC toolchain older than 12.1? That would be terrible. > > Good point. Yes, so should be something like: > >

[PATCH] D118110: [CMake] [Clang] Add CMake build option to specify long double format on PowerPC

2022-01-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: jsji, nemanjai, shchenz, PowerPC. Herald added subscribers: steven.zhang, kbarton, mgorny. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This method introduces new CMake variable `

[PATCH] D117972: [PowerPC] Fix SSE translation on FreeBSD

2022-01-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Thanks for the fix! Comment at: clang/lib/Headers/ppc_wrappers/mm_malloc.h:22 #else +#if defined(__linux__) extern "C" int posix_memalign (void **, size_t, size_t) throw (); Actually I just realised we don't need this guard, Clang alrea

[PATCH] D118110: [CMake] [Clang] Add CMake build option to specify long double format on PowerPC

2022-01-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 403114. qiucf marked 3 inline comments as done. qiucf edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118110/new/ https://reviews.llvm.org/D118110 Files: clang/CMakeLists.txt

[PATCH] D118110: [CMake] [Clang] Add CMake build option to specify long double format on PowerPC

2022-01-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. > It is probably not worth the effort since there won't be that many test cases > that test the front end's IR generation for long double, but there should be > a way to set up lit to know the default through its configuration files. Yes, lit doesn't know about it. But li

[PATCH] D117972: [PowerPC] Fix SSE translation on FreeBSD

2022-01-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf accepted this revision as: qiucf. qiucf added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117972/new/ https://reviews.llvm.org/D117972 ___

[PATCH] D118110: [CMake] [Clang] Add CMake build option to specify long double format on PowerPC

2022-01-26 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb797d5e6b21b: [CMake] [Clang] Add option to specify PowerPC long double format (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D116395: [Clang] Emit warning for -x option without effects

2022-01-27 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116395/new/ https://reviews.llvm.org/D116395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-02-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D116015#3326148 , @shchenz wrote: >> hiding the semantics from the optimizer is sometimes a good thing and >> sometimes a bad thing). > > Agree. Imagining a case when the neg and fma (from fnmsub) can both be CSE-ed > with anot

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-02-24 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 411046. qiucf marked an inline comment as done. qiucf edited the summary of this revision. qiucf added a comment. Replace existing `ppc.fnmsub` and `ppc.fnmsubs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1160

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-03-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 41. qiucf marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116015/new/ https://reviews.llvm.org/D116015 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/PowerPC/buil

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-03-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-math.c:98 // CHECK-NEXT:store double [[D:%.*]], double* [[D_ADDR]], align 8 +// CHECK-COUNT-3:load double, double* [[D_ADDR]], align 8 // CHECK-NEXT:[[TMP0:%.*]] = load double,

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-03-06 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb2497e54356d: [PowerPC] Add generic fnmsub intrinsic (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D119407: [PowerPC] [Clang] Add SSE4 and BMI compatible intrinsics implementation for PowerPC

2022-03-06 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 413336. qiucf added a comment. Herald added a project: All. Add P10 tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119407/new/ https://reviews.llvm.org/D119407 Files: clang

[PATCH] D121209: [clang][driver] Fix float128 diagnostics with glibc >= 2.32

2022-03-08 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf accepted this revision. qiucf added a comment. This revision is now accepted and ready to land. LGTM, thanks for the catch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121209/new/ https://reviews.llvm.org/D121209 __

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15122 + case PPC::BI__builtin_ppc_rsqrtd: { +auto FMF = Builder.getFastMathFlags(); +Builder.getFastMathFlags().setFast(); Seems FMF will be automatically restored without the three

[PATCH] D92815: [PowerPC] [Clang] Enable float128 feature on VSX targets

2021-04-26 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. Ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92815/new/ https://reviews.llvm.org/D92815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D116016: [Clang] [PowerPC] Emit module flag for current float abi

2022-01-04 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 397443. qiucf added a comment. Only emit the flags when any instance of `long double` is used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116016/new/ https://reviews.llvm.org/D116016 Files: clang/lib/CodeGe

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-11 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 398906. qiucf marked 2 inline comments as done. qiucf edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112906/new/ https://reviews.llvm.org/D112906 Files: clang/include/clang/Ba

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 399262. qiucf edited the summary of this revision. qiucf added a comment. Also check glibc version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112906/new/ https://reviews.llvm.org/D112906 Files: clang/inclu

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 399536. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112906/new/ https://reviews.llvm.org/D112906 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/PPCLinux.cpp clang/lib

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. Herald added subscribers: shchenz, kbarton, nemanjai. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In toolchains with proper support for IEEE float128, we can switch default long double semantics to it

[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: clang/lib/CodeGen/CGEx

[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] D114569: [PowerPC] Require htm feature for HTM builtins

2021-12-10 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd3cd0635e15a: [PowerPC] Require htm feature for HTM builtins (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116003: [NFC] Specify targets for clang stack-protector-guard.c

2021-12-19 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: tejohnson, MaskRay, lkail, nickdesaulniers. qiucf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The run line of `stack-protector-guard.c` doesn't specify the triple, which means it depe

<    1   2   3   >