[clang] [PowerPC][CLANG] DMF VSX Vector float GER 2x (rank-2 update) (PR #147383)

2025-07-17 Thread Lei Huang via cfe-commits
lei137 wrote: ping https://github.com/llvm/llvm-project/pull/147383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][CLANG] DMF VSX Vector float GER 2x (rank-2 update) (PR #147383)

2025-07-17 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147383 >From 627e01c2fa4fe756c5feff9b069026f43a2afa45 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/4] RFC02658:CLANG: DMF VSX Vector bfloat16 GER 2x (rank-2 update) -

[clang] [llvm] [NFC][PowerPC] Add test case for lockdown of vector compare greater than support for Zero vector comparisons (PR #147246)

2025-07-10 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. LGTM Thx https://github.com/llvm/llvm-project/pull/147246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][CLANG] DMF VSX Vector float GER 2x (rank-2 update) (PR #147383)

2025-07-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/147383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/147382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][PowerPC] Add test case for lockdown of vector compare greater than support for Zero vector comparisons (PR #147246)

2025-07-09 Thread Lei Huang via cfe-commits
@@ -0,0 +1,143 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=POWERPC_64 +// RUN: %clang_cc1 -triple powerpc64le-unk

[clang] [llvm] [NFC][PowerPC] Add test case for lockdown of vector compare greater than support for Zero vector comparisons (PR #147246)

2025-07-09 Thread Lei Huang via cfe-commits
@@ -0,0 +1,239 @@ +; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu \ +; RUN:< %s | FileCheck %s --check-prefix=POWERPC_64LE + +; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64-ibm-aix \ +; RUN: < %s | FileCheck %s --check-pref

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-09 Thread Lei Huang via cfe-commits
@@ -1148,14 +1078,33 @@ UNALIASED_CUSTOM_BUILTIN(mma_dmxvi8gerx4pp, "vW1024*W256V", true, "mma,paired-vector-memops") UNALIASED_CUSTOM_BUILTIN(mma_pmdmxvi8gerx4pp, "vW1024*W256Vi255i15i15", true, "mma,paired-vector-memops") -UN

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147382 >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/7] define new alias for accumulate builtins --- clang/include/clang

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147382 >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/6] define new alias for accumulate builtins --- clang/include/clang

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-08 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147382 >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/5] define new alias for accumulate builtins --- clang/include/clang

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/147382 Initial clean up in prep for adding more accumulate builtins to clang. >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147106)

2025-07-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/147106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147106)

2025-07-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147106 >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/4] define new alias for accumulate builtins --- clang/include/clang

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147106)

2025-07-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/147106 >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH 1/2] define new alias for accumulate builtins --- clang/include/clang

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147106)

2025-07-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/147106 Initial clean up in prep for adding more accumulate builtins to clang. >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH

[clang] [llvm] [PowerPC] Add BCDCOPYSIGN and BCDSETSIGN Instruction Support (PR #144874)

2025-06-27 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/144874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add BCDCOPYSIGN and BCDSETSIGN Instruction Support (PR #144874)

2025-06-27 Thread Lei Huang via cfe-commits
@@ -515,6 +515,10 @@ TARGET_BUILTIN(__builtin_altivec_vctzh, "V8UsV8Us", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzw, "V4UiV4Ui", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzd, "V2ULLiV2ULLi", "", "power9-vector") +//P9 BCD builtins +TARGET_BUILT

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add BCDCOPYSIGN and BCDSETSIGN Instruction Support (PR #144874)

2025-06-24 Thread Lei Huang via cfe-commits
@@ -515,6 +515,10 @@ TARGET_BUILTIN(__builtin_altivec_vctzh, "V8UsV8Us", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzw, "V4UiV4Ui", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzd, "V2ULLiV2ULLi", "", "power9-vector") +//P9 BCD builtins +TARGET_BUILT

[clang] [llvm] [PowerPC] Add BCDCOPYSIGN and BCDSETSIGN Instruction Support (PR #144874)

2025-06-24 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread Lei Huang via cfe-commits
@@ -567,6 +567,12 @@ TARGET_BUILTIN(__builtin_altivec_vextsh2w, "V4SiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsh2d, "V2SLLiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsw2d, "V2SLLiV4Si", "", "power9-vector") +// P9 Binary-coded dec

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. LGTM with nit. https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
@@ -0,0 +1,184 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple powerpc64le-linux-unknown -target-cpu future \ +// RUN: -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64le-linux-unknown -target-cp

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
@@ -3455,6 +3455,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, case BuiltinType::BFloat16: case BuiltinType::VectorQuad: case BuiltinType::VectorPair: +case BuiltinType::VectorDmr1024: lei137 wrote: nit: Maybe we can

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. In general this LGTM. Just a few nits. Please also update your descripton and PR title as it says you are dding `__dmr` type, but you are actually adding type `__dmr1024`. Thx! https://github.com/llvm/llvm-project/pull/142480 __

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/142480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
@@ -0,0 +1,94 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -O3 -triple powerpc64le-unknown-unknown -target-cpu future \ +// RUN: -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -O3 -triple powerpc64-ibm-aix -target-cp

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-18 Thread Lei Huang via cfe-commits
@@ -2,12 +2,110 @@ // RUN: -target-cpu pwr10 %s -verify lei137 wrote: maybe we should move these to a different test file -> ppc-dmr-types.c https://github.com/llvm/llvm-project/pull/142480 ___ cfe-commits mailing l

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-12 Thread Lei Huang via cfe-commits
@@ -0,0 +1,94 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py lei137 wrote: I might be missing something, what does `mmaplus` imply here? Since this tests mma builtins that uses the dmr registers, maybe `builtins-ppc-mma-dmr.c

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-12 Thread Lei Huang via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: not %clang_cc1 -triple powerpc64le-unknown-linux-gnu -target-cpu future \ lei137 wrote: nit: better not to have "future" in the test case names as "future" is a sliding thing? https://github.com/llvm/llvm-project/pull/142480

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-12 Thread Lei Huang via cfe-commits
@@ -0,0 +1,184 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py lei137 wrote: nit: maybe this tests can be renamed to `dmf-types.c`? https://github.com/llvm/llvm-project/pull/142480 ___

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-12 Thread Lei Huang via cfe-commits
@@ -30,6 +30,7 @@ #endif +PPC_VECTOR_MMA_TYPE(__dmr1024, VectorDmr1024, 1024) lei137 wrote: Since this is a vector type, maybe we can just keep the same naming convention? ```suggestion PPC_VECTOR_MMA_TYPE(__vector_dmr, VectorDmr, 1024) ``` https://github.c

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-12 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/142480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -294,6 +294,34 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, Ops, ""); } + // BCD convert builtins for P9 + case PPC::BI__builtin_ppc_national2packed: + case PPC::BI__builtin_ppc_packed2zoned: + case PPC::BI__built

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -567,6 +567,13 @@ TARGET_BUILTIN(__builtin_altivec_vextsh2w, "V4SiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsh2d, "V2SLLiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsw2d, "V2SLLiV4Si", "", "power9-vector") +// P9 BCD builtins (th

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -1617,10 +1617,14 @@ class VX_VT5_EO5_VB5_XO9_o eo, bits<9> xo, string opc, } // Decimal Convert From/to National/Zoned/Signed-QWord -def BCDCFN_rec : VX_VT5_EO5_VB5_PS1_XO9_o<7, 385, "bcdcfn." , []>; -def BCDCFZ_rec : VX_VT5_EO5_VB5_PS1_XO9_o<6, 385, "bcdcfz." , []>; -d

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -0,0 +1,23 @@ +// Testfile for negative condition for BCD builtins national2packed, packed2zoned and zoned2packed. lei137 wrote: What is the difference between this and `clang/test/Sema/builtins-bcd-transform.c` below? I am not sure we need both. https://gi

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -655,6 +655,14 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". DefaultAttrsIntrinsic<[llvm_v1i128_ty],[llvm_v1i128_ty],[IntrNoMem]>; // BCD intrinsics. + def int_ppc_national2packed: ClangBuiltin<"__builtin_ppc_national2packed">, +D

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
@@ -294,6 +294,34 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, Ops, ""); } + // BCD convert builtins for P9 + case PPC::BI__builtin_ppc_national2packed: + case PPC::BI__builtin_ppc_packed2zoned: + case PPC::BI__built

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-06 Thread Lei Huang via cfe-commits
https://github.com/lei137 requested changes to this pull request. Since the description will be the git commit message, maybe it should just be a summary of what this patch implements. https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits m

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/134430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/134430 >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH 1/3] [PowerPC] Update altivec.h to use __inline__ for c89 compatibilit

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/134430 >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH 1/2] [PowerPC] Update altivec.h to use __inline__ for c89 compatibilit

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/134430 None >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH] [PowerPC] Update altivec.h to use __inline__ for c89 compatibil

[clang] Fixed vec_pack_to_short_fp32 in Clang altivec.h (PR #129923)

2025-03-17 Thread Lei Huang via cfe-commits
lei137 wrote: @johnplatts Please resolve the conflicts for this PR. https://github.com/llvm/llvm-project/pull/129923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add additional checks to test for vec_pack_to_short_fp32 (PR #130324)

2025-03-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/130324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed vec_pack_to_short_fp32 in Clang altivec.h (PR #129923)

2025-03-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 commented: Thank-you for the fix John! It would be good if your patch can show the changes that is being introduced via this patch. In prep for that I have put up a [PR](https://github.com/llvm/llvm-project/pull/130324) to add the existing checks for this test. Can

[clang] [NFC] Add additional checks to test for vec_pack_to_short_fp32 (PR #130324)

2025-03-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/130324 Update tests in pref for IR changes that will be introduced in https://github.com/llvm/llvm-project/pull/129923 >From 51c05790f7cd38e6db324dcd55b7491118b1c3e2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri,

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/118004 >From e2046b5000e1a6e104121a8022d33f4f181f5d03 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Wed, 27 Nov 2024 18:44:38 + Subject: [PATCH 1/7] update llc tc affected --- .../CostModel/PowerPC/load-to-trunc.

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-09 Thread Lei Huang via cfe-commits
lei137 wrote: ping https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-04 Thread Lei Huang via cfe-commits
@@ -473,7 +473,7 @@ class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo { this->IntMaxType = TargetInfo::SignedLongLong; this->Int64Type = TargetInfo::SignedLongLong; this->SizeType = TargetInfo::UnsignedInt; -this->resetDataLayout("E-m:e-p:32:

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-03 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-03 Thread Lei Huang via cfe-commits
@@ -473,7 +473,7 @@ class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo { this->IntMaxType = TargetInfo::SignedLongLong; this->Int64Type = TargetInfo::SignedLongLong; this->SizeType = TargetInfo::UnsignedInt; -this->resetDataLayout("E-m:e-p:32:

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-11-28 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/118004 >From ae5beae74fcd7717bf40519c80a9d920625bb137 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Wed, 27 Nov 2024 18:44:38 + Subject: [PATCH 1/7] update llc tc affected --- .../CostModel/PowerPC/load-to-trunc.

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-11-28 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/118004 >From ae5beae74fcd7717bf40519c80a9d920625bb137 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Wed, 27 Nov 2024 18:44:38 + Subject: [PATCH 1/6] update llc tc affected --- .../CostModel/PowerPC/load-to-trunc.

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-11-28 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/118004 >From 6abea65c2667ecc0389c95e8a5527c360317524b Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Wed, 27 Nov 2024 18:44:38 + Subject: [PATCH 1/6] update llc tc affected --- .../CostModel/PowerPC/load-to-trunc.

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-11-28 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/118004 Fix 64-bit PowerPC part of https://github.com/llvm/llvm-project/issues/102783. >From 6abea65c2667ecc0389c95e8a5527c360317524b Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Wed, 27 Nov 2024 18:44:38 + Subjec

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Lei Huang via cfe-commits
lei137 wrote: > Will this affect the code that is generated for ‘__vector_quad’ values? There > is no direct way to load and store those so they will use pair loads and > stores. Not AFAIK. The change will get the alignment from the type given. The LIT test being updated also have `alloca` an

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/108606 >From 7d0d50768c75f57663d1c487157c8969e621f128 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 13 Sep 2024 17:11:09 + Subject: [PATCH] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/108606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-17 Thread Lei Huang via cfe-commits
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, CallOps.push_back(Ops[i]); llvm::Function *F = CGM.getIntrinsic(ID); Value *Call = Builder.CreateCall(F, CallOps); -return Builder.CreateAlignedStore(Call, Ops[0], MaybeAli

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-17 Thread Lei Huang via cfe-commits
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, CallOps.push_back(Ops[i]); llvm::Function *F = CGM.getIntrinsic(ID); Value *Call = Builder.CreateCall(F, CallOps); -return Builder.CreateAlignedStore(Call, Ops[0], MaybeAli

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-17 Thread Lei Huang via cfe-commits
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, CallOps.push_back(Ops[i]); llvm::Function *F = CGM.getIntrinsic(ID); Value *Call = Builder.CreateCall(F, CallOps); -return Builder.CreateAlignedStore(Call, Ops[0], MaybeAli

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/108606 Fixes #107229 >From 2c268981bb25cd1a1ed6c121789c5bd763fb1296 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 13 Sep 2024 17:11:09 + Subject: [PATCH] [PowerPC] Fix incorrect store alignment for __builtin

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/108584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/108584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/108584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/108584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/108584 >From 70077d359e2f98a3c4b24fcf638a51c6a0272473 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 13 Sep 2024 15:00:19 + Subject: [PATCH 1/2] [PowerPC][NFC] autogen mma tc checks via llvm/utils/update_cc_te

[clang] [PowerPC][NFC] autogen mma tc checks via update_cc_test_checks (PR #108584)

2024-09-13 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/108584 Checks for clang/test/CodeGen/PowerPC/builtins-ppc-pair-mma-types.c seem to have been manually upated to rename temp variables even though it says checks was auto generated. Regenerate via script in prep for ch

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-09 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/104816 >From ea3a071a2255fa103f5097272b2fa896a3d4b979 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Mon, 19 Aug 2024 12:24:31 -0400 Subject: [PATCH 1/3] Fix codegen for transparent_union function params Update codegen

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
lei137 wrote: > May it make sense to add tests with the argument passed in memory / by > reference? @s-barannikov Done. https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
lei137 wrote: > s-barannikov done. https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/104816 >From 5ceb717b6f9ce11a12fde4aa9aaa89b4e017ef70 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Mon, 19 Aug 2024 12:24:31 -0400 Subject: [PATCH 1/3] Fix codegen for transparent_union function params Update codegen

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-09-05 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/104816 >From 5ceb717b6f9ce11a12fde4aa9aaa89b4e017ef70 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Mon, 19 Aug 2024 12:24:31 -0400 Subject: [PATCH 1/2] Fix codegen for transparent_union function params Update codegen

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-08-21 Thread Lei Huang via cfe-commits
lei137 wrote: > I think the issue could be handled a different (more generic) way, by pulling > `useFirstFieldIfTransparentUnion` to the caller and taking transparent unions > into account when emitting LLVM IR for the formal / actual parameters > somewhere in `CGCall.cpp`, so that ABIInfo imp

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-08-19 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/104816 Update codegen for func param with transparent_union attr to be that of the first union member. This is a followup to #101738 to fix non-ppc codegen and closes #76773. >From 25f458a6f25ff0fa21d59e30934e314da8abc

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-19 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/101738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-19 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From c6a8dee17a0a2eeb3420e04fb445a633dfbee920 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/16] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-19 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/16] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-19 Thread Lei Huang via cfe-commits
@@ -0,0 +1,123 @@ +; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux -mcpu=pwr7 \ lei137 wrote: You are right. I verified that this pass even without this update to clang. Will remove this IR test from the PR. https://github.com/llvm/llvm-p

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-19 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/15] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-16 Thread Lei Huang via cfe-commits
lei137 wrote: > I'm not an expert here, but I think the change you made makes sense since the > `Ty` is supposed to be the first field. > > Also, might be a dumb question, I saw we have 32-bit Linux run lines, but is > that still worth testing? Thanks for taking a look @amy-kwan. The 32bit l

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-16 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/14] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-15 Thread Lei Huang via cfe-commits
lei137 wrote: Seems `CGT.ConvertType(Ty)` does what was needed. I've simplified the patch to use that instead. https://github.com/llvm/llvm-project/pull/101738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-15 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/13] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/12] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 ready_for_review https://github.com/llvm/llvm-project/pull/101738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/101390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101390 >From fad942502d77ffe45d23558e9bfa0370b0d06a46 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Mon, 29 Jul 2024 13:06:51 -0400 Subject: [PATCH 1/5] [PPC] Implement BCD assist builtins Implement BCD assist builtin

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 converted_to_draft https://github.com/llvm/llvm-project/pull/101738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/11] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-06 Thread Lei Huang via cfe-commits
lei137 wrote: I was thinking it would make the code cleaner if we can do something like this instead: ``` // For transparent union types, return the type of the first element. -// Set TU to true if Ty given was a transparent union and to false otherwise. +// and set CTy the integer type of the

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-06 Thread Lei Huang via cfe-commits
lei137 wrote: > Would it do any harm to just unconditionally compute the type and pass it > into getExtend()? This seem to cause issues for type `_Bool`, where it changes the function param from `i1 noundef zeroext %b1` to `i8 noundef zeroext %b1.coerce`. ``` $cat a.c void fcall(_Bool); _B

  1   2   >