[PATCH] D152914: [Draft] Make __builtin_cpu builtins target-independent

2023-10-10 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. HI @nemanjai, Did you get a chance to post this as a github PR? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152914/new/ https://reviews.llvm.org/D152914 ___ cfe-commits mailing

[PATCH] D74094: Reapply: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2023-08-15 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. @nickdesaulniers I have verified this patch on top of `40ee8abee77a2e8fb0089d4c7f5723b71f27d416` passes our multistage bot http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage Thank-you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74094: Reapply: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2023-08-15 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. Sorry I missed this. Will kick off now and let you know the results soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74094/new/ https://reviews.llvm.org/D74094 ___ cfe-commits

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-11 Thread Lei Huang 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 rGe6f18b75d7ff: [clangd] Remove extra dependancies for clangd (authored by saghir, committed by lei). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-11 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 549374. lei added a comment. Rebase to ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155540/new/ https://reviews.llvm.org/D155540 Files: clang-tools-extra/clangd/tool/CMakeLists.txt Index:

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-09 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. I was thinking to commit this patch to minimize the dependencies if there are no objections. @MaskRay @nemanjai any preferences? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155540/new/ https://reviews.llvm.org/D155540

[PATCH] D157078: [include-cleaner] Handle files with unnamed buffers

2023-08-04 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. This is causing a ld.lld link failure in https://lab.llvm.org/buildbot/#/builders/57 FAILED: tools/clang/tools/extra/include-cleaner/unittests/ClangIncludeCleanerTests : && /home/buildbots/clang.15.0.4/bin/clang++ --gcc-toolchain=/usr -fPIC

[PATCH] D144611: [PowerPC] Adding test coverage for vector compatibility warning

2023-03-13 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. thx for the added coverage. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144611/new/ https://reviews.llvm.org/D144611

[PATCH] D145506: [PowerPC] Emit warn_deprecated_lax_vec_conv_all warning only for PPC

2023-03-13 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM Thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145506/new/ https://reviews.llvm.org/D145506

[PATCH] D131622: [NFC][PowerPC] Add missing NOCOMPAT checks for builtins-ppc-xlcompat.c

2022-08-16 Thread Lei Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d8ae9f755d7: [NFC][PowerPC] Add missing NOCOMPAT checks for builtins-ppc-xlcompat.c (authored by lei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131622: [NFC][PowerPC] Add missing NOCOMPAT checks for builtins-ppc-xlcompat.c

2022-08-10 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: nemanjai, amyk, power-llvm-team. Herald added a subscriber: shchenz. Herald added a project: All. lei requested review of this revision. Herald added a project: clang. Followup patch to address request from https://reviews.llvm.org/D124093

[PATCH] D129016: [PowerPC] implemented @llvm.ppc.kill.canary to corrupt stack guard

2022-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/test/CodeGen/PowerPC/kill-canary-intrinsic.ll:4 +; RUN: --ppc-asm-full-reg-names < %s | FileCheck %s -check-prefix=AIX +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux \ +; RUN: --ppc-asm-full-reg-names < %s |

[PATCH] D128288: [PowerPC] Fix signatures for vec_replace_unaligned builtin

2022-06-29 Thread Lei Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcaf7243a6b53: [PowerPC] Fix signatures for vec_replace_unaligned builtin (authored by lei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128288/new/

[PATCH] D128288: [PowerPC] Fix signatures for vec_replace_unaligned builtin

2022-06-21 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: amyk, quinnp, power-llvm-team. Herald added subscribers: shchenz, nemanjai. Herald added a project: All. lei requested review of this revision. Herald added a project: clang. ``vec_replace_unaligned`` is meant to return vuc to emphasize that

[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

2022-06-16 Thread Lei Huang 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 rG711a71d1ab10: PowerPC] Emit warning for incompatible vector types that are currently… (authored by maryammo, committed by lei). Repository: rG

[PATCH] D124093: [PowerPC] Fixing implicit castings in altivec for -fno-lax-vector-conversions

2022-06-16 Thread Lei Huang via Phabricator via cfe-commits
lei marked an inline comment as not done. lei added inline comments. Comment at: clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat.c:8 // RUN: -D__XL_COMPAT_ALTIVEC__ -target-cpu pwr8 | FileCheck %s -// RUN: %clang_cc1 -no-opaque-pointers -target-feature +altivec

[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

2022-06-16 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7738 +// This returns true if both vectors have the same element type. +bool Sema::areVectorTypesSameElmType(QualType SrcTy, QualType DestTy) { + assert((DestTy->isVectorType() || SrcTy->isVectorType()) &&

[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

2022-06-16 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7716 +// This returns true if at least one of the types is an altivec vector. +bool Sema::areAnyVectorTypesAltivec(QualType SrcTy, QualType DestTy) { + assert((DestTy->isVectorType() || SrcTy->isVectorType()) &&

[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

2022-06-15 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. LGTM, just a few nit that can be addressed on commit. Comment at: clang/lib/Sema/SemaExpr.cpp:7723 + + if (SrcTy->isVectorType()) { +VectorType::VectorKind SrcVecKind = do we really need this check since we have an assert above?

[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

2022-06-15 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. Please document all new functions added. Comment at: clang/lib/Sema/SemaExpr.cpp:7715 +bool Sema::areAnyVectorTypesAltivec(QualType SrcTy, QualType DestTy) { + assert(DestTy->isVectorType() || SrcTy->isVectorType()); amyk wrote: > Can

[PATCH] D125506: [PowerPC] Implement XL compat __fnabs and __fnabss builtins.

2022-05-18 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fnabs.ll:46 +; RUN: -mattr=-vsx < %s | FileCheck %s --check-prefix=CHECK-NOVSX + +declare double @llvm.ppc.fnabs(double) nit: same as before no need to test all combination

[PATCH] D125506: [PowerPC] Implement XL compat __fnabs and __fnabss builtins.

2022-05-17 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. LGTM with minor updates before commit. Comment at: clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fnabs.c:25 +// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-aix

[PATCH] D120907: [docs] Add PowerPC release notes for LLVM 14

2022-03-03 Thread Lei Huang via Phabricator via cfe-commits
lei closed this revision. lei added a comment. Commited to release/14.x Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120907/new/ https://reviews.llvm.org/D120907 ___ cfe-commits mailing list

[PATCH] D120907: [docs] Add PowerPC release notes for LLVM 14

2022-03-03 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. In D120907#3357433 , @ldionne wrote: > LGTM for libc++. I assume this is targeting `release/14.x` only. yes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120907/new/

[PATCH] D120907: [docs] Add PowerPC release notes for LLVM 14

2022-03-03 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 412710. lei added a comment. remove unintented change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120907/new/ https://reviews.llvm.org/D120907 Files: clang/docs/ReleaseNotes.rst libcxx/docs/ReleaseNotes.rst

[PATCH] D120907: [docs] Add PowerPC release notes for LLVM 14

2022-03-03 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: hubert.reinterpretcast, nemanjai, jsji. Herald added a subscriber: shchenz. Herald added a project: All. lei requested review of this revision. Herald added projects: clang, libc++, LLVM. Herald added subscribers: llvm-commits, libcxx-commits,

[PATCH] D109652: [PowerPC] Restrict various P10 options to P10 only.

2021-10-18 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. LGTM I think you went a bit overkill with the tests for this patch . Please cut down the number of run lines before committing. Comment at: clang/test/Driver/ppc-p10-features-support-check.c:4 +// RUN:

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-10-04 Thread Lei Huang 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 rG8b3d944a97cc: [PowerPC] Disable vector types when not supported by subtarget features (authored by lei). Repository: rG LLVM Github Monorepo

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-10-04 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 376969. lei added a comment. address line comment and update tc to reflect new behaviour. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109178/new/ https://reviews.llvm.org/D109178 Files:

[PATCH] D107899: [PowerPC] Implement builtin for vbpermd

2021-09-27 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Headers/altivec.h:17337 static __inline__ vector long long __ATTRS_o_ai vec_vbpermq(vector unsigned char __a, vector unsigned char __b) {

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-09-27 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 375360. lei added a comment. Address review comments and add handling for vector long types without vsx. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109178/new/ https://reviews.llvm.org/D109178 Files:

[PATCH] D109437: [PowerPC] FP compare and test XL compat builtins.

2021-09-24 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. LGTM Pleases address nit on commit. Comment at: clang/lib/Sema/SemaChecking.cpp:3495-3496 +ArgType != QualType(Context.DoubleTy)) { + Diag(TheCall->getBeginLoc(), diag::err_ppc_invalid_test_data_class_type);

[PATCH] D109437: [PowerPC] FP compare and test XL compat builtins.

2021-09-23 Thread Lei Huang via Phabricator via cfe-commits
lei requested changes to this revision. lei added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Sema/Sema.h:12680 bool CheckPPCMMAType(QualType Type, SourceLocation TypeLoc); + bool CheckPPCTestDataClassType(CallExpr

[PATCH] D109710: [PowerPC] Add range checks for P10 Vector Builtins

2021-09-23 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM Please add comment to tc upon commit. Comment at: clang/test/CodeGen/builtins-ppc-p10vector.c:1417 +vector signed int test_vec_vec_splati_ins_range(void) { + //

[PATCH] D107647: [PowerPC] MMA - Add __builtin_vsx_build_pair and __builtin_mma_build_acc builtins

2021-09-23 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. LGTM once the code is simplified as Nemanja suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107647/new/ https://reviews.llvm.org/D107647

[PATCH] D110282: [PowerPC] SemaChecking for darn family of builtins

2021-09-23 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM. Pleases address the test issue on commit. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-darn-32.c:13 +int testdarn_32(void) { + return __darn_32(); +}

[PATCH] D110084: [PowerPC] Support for vector bool int128 on vector comparison builtins

2021-09-21 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110084/new/ https://reviews.llvm.org/D110084

[PATCH] D109710: [PowerPC] Add range checks for P10 Vector Builtins

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-p10vector.c:1414 // CHECK-LE: ret <4 x float> return vec_splati_ins(vfa, 0, 1.0f); } Need to add a testcase where param `b` to `vec_splati_ins(a,b,c)` is not 0 or 1. Repository: rG

[PATCH] D109437: [PowerPC] FP compare and test XL compat builtins.

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3518 +// valid. The argument must be either a 'float' or a 'double'. +bool Sema::CheckPPCTestDataClassType(CallExpr *TheCall) { + QualType ArgType = TheCall->getArg(0)->getType(); I don't

[PATCH] D108823: [PowerPC] Mark splat immediate instructions as rematerializable

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. This revision is now accepted and ready to land. LGTM Thx. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108823/new/ https://reviews.llvm.org/D108823

[PATCH] D109780: [PowerPC] Add range check for vec_genpcvm builtins

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. LGTM. Thx! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109780/new/ https://reviews.llvm.org/D109780 ___ cfe-commits mailing list

[PATCH] D109996: [PowerPC] Fix signature of lxvp and stxvp builtins

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei added a comment. LTGM Thx! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109996/new/ https://reviews.llvm.org/D109996 ___ cfe-commits mailing list

[PATCH] D109652: [PowerPC] Restrict various P10 options to P10 only.

2021-09-20 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:566-569 + if (llvm::find(FeaturesVec, "+pcrel") != FeaturesVec.end()) { +Diags.Report(diag::err_opt_not_valid_without_opt) << "-mpcrel" +

[PATCH] D108302: [PowerPC] Fixed the crash due to early if conversion with fixed CR fields.

2021-09-07 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. LGTM Thx! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108302/new/ https://reviews.llvm.org/D108302 ___

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-09-07 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-int128.c:4 +// RUN: -triple powerpc64-unknown-unknown -target-cpu pwr8 \ +// RUN: -emit-llvm %s -o - -U__XL_COMPAT_ALTIVEC__ | FileCheck %s +// RUN: %clang_cc1 -target-feature +altivec -target-feature +vsx

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-09-02 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 370349. lei added a comment. fix spelling in commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109178/new/ https://reviews.llvm.org/D109178 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-09-02 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: hubert.reinterpretcast, nemanjai, power-llvm-team. Herald added a subscriber: shchenz. lei requested review of this revision. Herald added a project: clang. Update clang to treat vector unsigned long long and friends as invalid for AlttiVec without

[PATCH] D109126: [PowerPC] [NFC] Add Big-Endian checks for existing MMA tests

2021-09-02 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. Is it really necessary to add the BE checks in this patch if they are the same as LE checks? Why not just add it later when there is a diff seen? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109126/new/

[PATCH] D107647: [PowerPC] MMA - Add __builtin_vsx_build_pair and __builtin_mma_build_acc builtins

2021-08-26 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15833 + // without the need for the programmer to swap operands. + if (IsLE) { +SmallVector RevOps; doesn't look like we need the interm var `IsLE`. Just use the call

[PATCH] D108702: [PowerPC][NFC] Rename P10 builtins vec_clrl, vec_clrr to vec_clr_first and vec_clr_last

2021-08-25 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei 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/D108702/new/ https://reviews.llvm.org/D108702

[PATCH] D108302: [PowerPC] Fixed the crash due to early if conversion with fixed CR fields.

2021-08-25 Thread Lei Huang via Phabricator via cfe-commits
lei requested changes to this revision. lei added a comment. This revision now requires changes to proceed. I think there is something wrong with this diff cause there is no context available for `PPCInstrInfo.cpp`. Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1548 +

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-12 Thread Lei Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8930af45c35b: [PowerPC] Implement XL compatibility builtin __addex (authored by lei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-12 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 366094. lei added a comment. Fix name of new warning message to be more accuratly represent the diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files:

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-12 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 366062. lei added a comment. Update diag id Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-11 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 365816. lei added a comment. Add -W flag to new warning message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107647: [PowerPC] MMA - Remove deprecated built-ins and add new built-ins

2021-08-10 Thread Lei Huang via Phabricator via cfe-commits
lei requested changes to this revision. lei added a comment. This revision now requires changes to proceed. Actually we should not be removing the deprecated bultins. Just need to add the new ones. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D107647: [PowerPC] MMA - Remove deprecated built-ins and add new built-ins

2021-08-10 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. LGTM Can we update the title and description to be more specific though? [PowerPC] MMA - Rename deprecated builtins mma_assemble_acc, vsx_assemble_pair Rename deprecated builtins : __builtin_mma_assemble_acc __builtin_vsx_assemble_pair To:

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-10 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-pwr9-warning.c:4 +// RUN: -verify %s + +extern unsigned long long ull; NeHuang wrote: > can we also add the run lines for 64 bit LE Linux, 64 bit AIX and 32 bit AIX? > Will also

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-08-10 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 365480. lei marked 2 inline comments as done. lei added a comment. update sema check condition and remove duplicate tc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-30 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/lib/Target/PowerPC/P9InstrResources.td:1434 + ADDEX, + ADDEX8 )> { let Unsupported = 1; } nemanjai wrote: > You have added the 64-bit version of this, but it seems this is only > available for 64-bit operands in

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-29 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362734. lei added a comment. put back unintentional space change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362536. lei added a comment. remove extra space Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362535. lei added a comment. fix minor wording and spelling mistakes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: stefanp, nemanjai, NeHuang, power-llvm-team. Herald added subscribers: shchenz, hiraditya. lei requested review of this revision. Herald added projects: clang, LLVM. Add builtin and intrinsic for `__addex`. This patch is part of a series of patches

[PATCH] D106757: [PowerPC] Implement partial vector ld/st builtins for XL compatibility

2021-07-26 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. thx for the update! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106757/new/ https://reviews.llvm.org/D106757 ___ cfe-commits mailing list

[PATCH] D106757: [PowerPC] Implement partial vector ld/st builtins for XL compatibility

2021-07-26 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15133 +bool IsLE = getTarget().isLittleEndian(); +auto StoreSubVec = [&](unsigned Width, unsigned Offset, unsigned EltNo) { + switch (Width) { I find the nested switch to be a

[PATCH] D106484: [PowerPC] Add PowerPC "__stbcx" builtin and intrinsic for XL compatibility

2021-07-21 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsPPC.def:116 BUILTIN(__builtin_ppc_fres, "ff", "") +BUILTIN(__builtin_ppc_stbcx, "icD*i", "") maybe move this up to where `__builtin_ppc_stdcx` is defined. To match what you did in

[PATCH] D103986: [PowerPC] Floating Point Builtins for XL Compat.

2021-07-20 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. please rebase to ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103986/new/ https://reviews.llvm.org/D103986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D106130: [PowerPC] Implemented mtmsr, mfspr, mtspr Builtins

2021-07-19 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/test/CodeGen/builtins-ppc-xlcompat-move-tofrom-regs.ll:3 +; NOTE: Had to manually modify the last test case (mtmsr) to allow the +; NOTE: common check of mtmsr instead of 4 different check prefixes ; RUN: llc -verify-machineinstrs

[PATCH] D105957: [PowerPC] Implement intrinsics for mtfsf[i]

2021-07-16 Thread Lei Huang 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 rG35a18a981f6b: [PowerPC] Implement intrinsics for mtfsf[i] (authored by nemanjai, committed by lei). Changed prior to commit:

[PATCH] D105946: [PowerPC] Store, load, move from and to registers related builtins

2021-07-16 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c:15 + // CHECK-LABEL: @test_lwarx // CHECK: %0 = tail call i32 asm sideeffect "lwarx $0, ${1:y}", "=r,*Z,~{memory}"(i32* %a) return __lwarx(a); where is

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-16 Thread Lei Huang 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 rGc8937b6cb975: [PowerPC] Implement XL compact math builtins (authored by lei). Changed prior to commit:

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-16 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:3087 // RM should be set. +let hasSideEffects = 1 in { def MTFSB0 : XForm_43<63, 70, (outs), (ins u5imm:$FM), nemanjai wrote: > nemanjai wrote: > > I think we should conservatively

[PATCH] D105946: [PowerPC] Store, load, move from and to registers related builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:1569 } - nit: un-related line deletion Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:5449 + def : Pat<(int_ppc_sthcx xoaddr:$dst, gprc:$A), +

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 359070. lei added a comment. rebase to ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105930/new/ https://reviews.llvm.org/D105930 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:3650 +// XL Compat intrinsics. +def : Pat<(int_ppc_fmsub f64:$A, f64:$B, f64:$C), (FMSUB $A, $B, $C)>; +def : Pat<(int_ppc_fmsubs f32:$A, f32:$B, f32:$C), (FMSUBS $A, $B, $C)>;

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 359050. lei marked 3 inline comments as done. lei added a comment. Address review comments to add/upate: - builtin encoding for params that need to be folded into constant expr - llvm intrinsic property for immediates - test line for `-mattr=-vsx` Repository:

[PATCH] D105946: [PowerPC] Store, load, move from and to registers related builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3371 +return SemaFeatureCheck(*this, TheCall, "extdiv", +diag::err_ppc_builtin_only_on_arch, "8"); #define CUSTOM_BUILTIN(Name, Intr, Types, Acc) \ need tests

[PATCH] D105946: [PowerPC] Store, load, move from and to registers related builtins

2021-07-15 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:1569 + def int_ppc_sthcx : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrWriteMem]>; + def int_ppc_lharx : GCCBuiltin<"__builtin_ppc_lharx">, +

[PATCH] D105946: [PowerPC] Store, load, move from and to registers related builtins

2021-07-14 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. please add sema checking for pwr8 builtins. Comment at: llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond.ll:80 +declare i32 @llvm.ppc.lharx(i8*) +define dso_local signext i16 @test_lharx(i16* %a) local_unnamed_addr #0 { +;

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-14 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 358665. lei added a comment. cleanup tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105930/new/ https://reviews.llvm.org/D105930 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D104386: [PowerPC][Builtins] Added a number of builtins for compatibility with XL.

2021-07-14 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsPPC.def:48 BUILTIN(__builtin_ppc_icbt, "vv*", "") +BUILTIN(__builtin_ppc_alignx, "viCvC*", "nc") +BUILTIN(__builtin_ppc_rdlam, "UWiUWiUWiCUWi", "nc") I think you need sema checking for

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-13 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 358409. lei added a comment. update tc to only check for pwr7 and up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105930/new/ https://reviews.llvm.org/D105930 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D105930: [PowerPC] Implement XL compact math builtins

2021-07-13 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: stefanp, nemanjai, power-llvm-team. Herald added subscribers: shchenz, hiraditya. lei requested review of this revision. Herald added projects: clang, LLVM. Implement a subset of builtins required for compatiblilty with AIX XL compiler.

[PATCH] D105501: [PowerPC] Power ISA features for Semachecking

2021-07-12 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3278 + StringRef DiagArg = "") { + if (!S.Context.getTargetInfo().hasFeature(FeatureToCheck)) { +if (!DiagArg.empty()) { may I suggest early exit instead?

[PATCH] D104664: [PowerPC][NFC] Clean up builtin sema checks

2021-06-22 Thread Lei Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb259740801d3: [PowerPC][NFC] Clean up builtin sema checks (authored by lei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104664/new/

[PATCH] D104664: [PowerPC][NFC] Clean up builtin sema checks

2021-06-21 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 353515. lei added a comment. remove extra ";" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104664/new/ https://reviews.llvm.org/D104664 Files: clang/lib/Sema/SemaChecking.cpp Index:

[PATCH] D102875: [PowerPC] Add PowerPC compare and multiply related builtins and instrinsics for XL compatibility

2021-06-17 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-compare-64bit-only.c:8 +// RUN: not %clang_cc1 -triple powerpc-unknown-aix \ +// RUN: -emit-llvm %s -o - -target-cpu pwr9 2>&1 | FileCheck %s -check-prefix=CHECK-32 +

[PATCH] D102875: [PowerPC] Add PowerPC compare and multiply related builtins and instrinsics for XL compatibility

2021-06-17 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-compare-64bit-only.c:6 +// RUN: %clang_cc1 -triple powerpc64-unknown-aix \ +// RUN: -emit-llvm %s -o - -target-cpu pwr9 | FileCheck %s --check-prefix=CHECK-64 +// RUN: not %clang_cc1 -triple

[PATCH] D102875: [PowerPC] Add PowerPC compare and multiply related builtins and instrinsics for XL compatibility

2021-06-17 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:354 - void defineXLCompatMacros(MacroBuilder ) const { -Builder.defineMacro("__popcntb", "__builtin_ppc_popcntb"); Can you pleases rebase your patch again? The removal of this function

[PATCH] D104125: [PowerPC] Moving defineXLCompatMacros() definition

2021-06-14 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. LGTM Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104125/new/ https://reviews.llvm.org/D104125

[PATCH] D102191: [PowerPC] Add clang option -m[no-]prefixed

2021-05-13 Thread Lei Huang 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 rG9469ff15b779: [PowerPC] Add clang option -m[no-]prefixed (authored by lei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102191: [PowerPC] Add clang option -m[no-]prefixed

2021-05-10 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: stefanp, nemanjai, power-llvm-team. Herald added subscribers: dang, shchenz. lei requested review of this revision. Herald added a project: clang. Add user-facing front end option to turn off power10 prefixed instructions. Repository: rG LLVM

[PATCH] D99193: [PowerPC] Add mprivileged option

2021-03-23 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei 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/D99193/new/ https://reviews.llvm.org/D99193 ___

[PATCH] D99185: [PowerPC] Change option to mrop-protect

2021-03-23 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision as: lei. lei 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/D99185/new/ https://reviews.llvm.org/D99185

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2021-03-08 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. Instead of waiting a day or two, can you please directly ping reviewers who had concerns related to the round-trip-args behaviour to get feedback? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89986/new/

[PATCH] D95634: [PowerPC][Power10] Fix XXSPLI32DX not correctly exploiting specific cases

2021-01-28 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95634/new/ https://reviews.llvm.org/D95634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D90799: [PowerPC] Add paired vector load and store builtins and intrinsics

2020-11-09 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:2658 + return false; +} + There's alot of nested `if`s, would it be possible to refactor to have some early exits instead? Comment at:

[PATCH] D87804: [PowerPC][Power10] Implement Vector signed/unsigned __int128 overloads for the comparison builtins

2020-09-18 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. please fix the clang format issues. Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:365 + def int_ppc_altivec_vcmpequq : GCCBuiltin<"__builtin_altivec_vcmpequq">, + Intrinsic<[llvm_v1i128_ty], [llvm_v1i128_ty, llvm_v1i128_ty], +

[PATCH] D84968: [PowerPC] Legalize v256i1 and v512i1 and implement load and store of these types

2020-09-18 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. Just some minor comments. Please address them prior to commit. Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10519 + // 2 or 4 vsx registers. + if (VT == MVT::v256i1

  1   2   >