[llvm-branch-commits] [llvm] release/18.x: [LoongArch] Override LoongArchTargetLowering::getExtendForAtomicCmpSwapArg (#83656) (PR #83750)

2024-03-03 Thread WÁNG Xuěruì via llvm-branch-commits
xen0n wrote: I agree with backporting the change, as the actual code change is trivial and fixes a bug regarding atomic ops, which is known to be a subtle area important to overall system stability. Without the backport distro maintainers would still have to cherry-pick it themselves, duplicat

[llvm-branch-commits] [llvm] release/18.x: [llvm][LoongArch] Improve loongarch_lasx_xvpermi_q instrinsic (#82984) (PR #83540)

2024-03-07 Thread WÁNG Xuěruì via llvm-branch-commits
xen0n wrote: For the record, based on the principle of "explicit is better than implicit" that generally holds, I'd favor an approach where such compile-time-verifiable out-of-range operands are given compile-time errors, or we should just pass through the value unmodified. Otherwise the intri

[llvm-branch-commits] [llvm] release/18.x: [LoongArch] Assume no-op addrspacecasts by default (#82332) (PR #86372)

2024-03-22 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. https://github.com/llvm/llvm-project/pull/86372 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n edited https://github.com/llvm/llvm-project/pull/92223 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n commented: Maybe unify all warning messages' format into `warning: blah blah`? LGTM apart from the natural language usages. https://github.com/llvm/llvm-project/pull/92223 ___ llvm-branch-commits mailing list llvm-branch-commi

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-15 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -52,63 +53,129 @@ static ABI checkABIStandardized(ABI Abi) { return Abi; } -ABI computeTargetABI(const Triple &TT, StringRef ABIName) { - ABI ArgProvidedABI = getTargetABI(ABIName); +static ABI getTripleABI(const Triple &TT) { bool Is64Bit = TT.isArch64Bit(); ABI T

[llvm-branch-commits] [LoongArch] Refactor LoongArchABI::computeTargetABI (PR #92223)

2024-05-16 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. https://github.com/llvm/llvm-project/pull/92223 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/19.x: [LoongArch] Fix the assertion for atomic store with 'ptr' type (PR #109915)

2024-09-25 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. fixes loongson-community/discussions#68 https://github.com/llvm/llvm-project/pull/109915 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm-branch-commits] [clang] release/19.x: [LoongArch][Clang] Make the parameters and return value of {x, }vxor.v builti ns `unsigned char` vectors (#114513) (PR #114958)

2024-11-06 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. Test failures shouldn't be relevant. https://github.com/llvm/llvm-project/pull/114958 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-16 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -0,0 +1,115 @@ +# REQUIRES: loongarch + +# RUN: llvm-mc --filetype=obj --triple=loongarch32 -mattr=+relax --defsym ELF32=1 %s -o %t.32.o +# RUN: llvm-mc --filetype=obj --triple=loongarch64 -mattr=+relax %s -o %t.64.o + +# RUN: ld.lld %t.32.o -o %t.32 +# RUN: llvm-objdump -d --

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-16 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -1015,8 +1063,20 @@ void LoongArch::finalizeRelax(int passes) const { r.expr = r.sym->hasFlag(NEEDS_PLT) ? R_PLT_PC : R_PC; break; case R_LARCH_B26: + case R_LARCH_TLS_LE_LO12_R: +skip = 4; +write32le(p, aux.

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-16 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -863,6 +874,35 @@ static void relaxCall36(Ctx &ctx, const InputSection &sec, size_t i, } } +// Relax code sequence. +// From: +// lu12i.w $rd, %le_hi20_r(sym) +// add.w/d $rd, $rd, $tp, %le_add_r(sym) +// addi/ld/st.w/d $rd, $rd, %le_lo12_r(sym) +// To: +// addi/

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-16 Thread WÁNG Xuěruì via llvm-branch-commits
@@ -1015,8 +1063,20 @@ void LoongArch::finalizeRelax(int passes) const { r.expr = r.sym->hasFlag(NEEDS_PLT) ? R_PLT_PC : R_PC; break; case R_LARCH_B26: + case R_LARCH_TLS_LE_LO12_R: +skip = 4; +write32le(p, aux.

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-17 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/123600 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [LoongArch][MC] Add relocation support for fld fst [x]vld [x]vst (PR #133225)

2025-03-27 Thread WÁNG Xuěruì via llvm-branch-commits
https://github.com/xen0n approved this pull request. Nice catch! https://github.com/llvm/llvm-project/pull/133225 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit