libstdc++: [_GLIBCXX_INLINE_VERSION] Use cxx11 abi [PR83077] #17
No reviewers
Labels
No labels
Compat/Breaking
Frontend/ada
Frontend/c
Frontend/c++
Frontend/rust
General/forge
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Library/libgcc
Library/libstdc++
Midend/gimple
Midend/rtl
Midend/tree
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Target/aarch64
Target/arm
Target/i386
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gcc/gcc!17
Loading…
Reference in a new issue
No description provided.
Delete branch "fdumont/gcc-TEST:version_ns_cxx11_abi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use cxx11 abi when activating versioned namespace mode. To do so support a new
configuration mode where !_GLIBCXX_USE_DUAL_ABI and _GLIBCXX_USE_CXX11_ABI.
The main change is that std::__cow_string is now defined whenever _GLIBCXX_USE_DUAL_ABI
or _GLIBCXX_USE_CXX11_ABI is true. Implementation is using available COW std::string in
case of dual abi and a subset of it when it's not.
This patch adds optimization of the following patterns: (zero_extend:M (subreg:N (not:O==M (X:Q==M)))) -> (xor:M (zero_extend:M (subreg:N (X:M)), mask)) ... where the mask is GET_MODE_MASK (N). For the cases when X:M doesn't have any non-zero bits outside of mode N, (zero_extend:M (subreg:N (X:M)) could be simplified to just (X:M) and whole optimization will be: (zero_extend:M (subreg:N (not:M (X:M)))) -> (xor:M (X:M, mask)) Patch targets to handle code patterns like: not a0,a0 andi a0,a0,0xff to be optimized to: xori a0,a0,255 Change was locally tested for x86_64 and AArch64 (as most common) and for RV-64 and MIPS-32 targets (as having an effect from this optimization): no regressions for all cases. PR rtl-optimization/112398 gcc/ChangeLog: * simplify-rtx.cc (simplify_context::simplify_unary_operation_1): Simplify ZERO_EXTEND (SUBREG (NOT X)) to XOR (X, GET_MODE_MASK(SUBREG)) when X doesn't have any non-zero bits outside of SUBREG mode. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr112398.c: New test. Signed-off-by: Alexey Merzlyakov <alexey.merzlyakov@samsung.com>This patch would like to support .SAT_ADD when one of the op is singed IMM. Form1: T __attribute__((noinline)) \ sat_s_add_imm_##T##_fmt_1##_##INDEX (T x) \ { \ T sum = (UT)x + (UT)IMM; \ return (x ^ IMM) < 0 \ ? sum \ : (sum ^ x) >= 0 \ ? sum \ : x < 0 ? MIN : MAX; \ } Take below form1 as example: DEF_SAT_S_ADD_IMM_FMT_1(0, int8_t, uint8_t, -10, INT8_MIN, INT8_MAX) Before this patch: __attribute__((noinline)) int8_t sat_s_add_imm_int8_t_fmt_1_0 (int8_t x) { int8_t sum; unsigned char x.0_1; unsigned char _2; signed char _4; int8_t _5; _Bool _9; signed char _10; signed char _11; signed char _12; signed char _14; signed char _16; <bb 2> [local count: 1073741824]: x.0_1 = (unsigned char) x_6(D); _2 = x.0_1 + 246; sum_7 = (int8_t) _2; _4 = x_6(D) ^ sum_7; _16 = x_6(D) ^ 9; _14 = _4 & _16; if (_14 < 0) goto <bb 3>; [41.00%] else goto <bb 4>; [59.00%] <bb 3> [local count: 259738147]: _9 = x_6(D) < 0; _10 = (signed char) _9; _11 = -_10; _12 = _11 ^ 127; <bb 4> [local count: 1073741824]: # _5 = PHI <sum_7(2), _12(3)> return _5; } After this patch: __attribute__((noinline)) int8_t sat_s_add_imm_int8_t_fmt_1_0 (int8_t x) { int8_t _5; <bb 2> [local count: 1073741824]: _5 = .SAT_ADD (x_6(D), -10); [tail call] return _5; } The below test suites are passed for this patch: 1. The rv64gcv fully regression tests. 2. The x86 bootstrap tests. 3. The x86 fully regression tests. Signed-off-by: Li Xu <xuli1@eswincomputing.com> gcc/ChangeLog: * match.pd: Add the form1 of signed imm .SAT_ADD matching. * tree-ssa-math-opts.cc (match_saturation_add): Add fold convert for const_int to the type of operand 0.This patch adds testcase for form1, as shown below: T __attribute__((noinline)) \ sat_s_add_imm_##T##_fmt_1##_##INDEX (T x) \ { \ T sum = (UT)x + (UT)IMM; \ return (x ^ IMM) < 0 \ ? sum \ : (sum ^ x) >= 0 \ ? sum \ : x < 0 ? MIN : MAX; \ } Passed the rv64gcv regression test. Signed-off-by: Li Xu <xuli1@eswincomputing.com> gcc/testsuite/ChangeLog: * gcc.target/riscv/sat_arith.h: Support signed imm SAT_ADD form1. * gcc.target/riscv/sat_s_add_imm-1-1.c: New test. * gcc.target/riscv/sat_s_add_imm-1.c: New test. * gcc.target/riscv/sat_s_add_imm-2-1.c: New test. * gcc.target/riscv/sat_s_add_imm-2.c: New test. * gcc.target/riscv/sat_s_add_imm-3-1.c: New test. * gcc.target/riscv/sat_s_add_imm-3.c: New test. * gcc.target/riscv/sat_s_add_imm-4.c: New test. * gcc.target/riscv/sat_s_add_imm-run-1.c: New test. * gcc.target/riscv/sat_s_add_imm-run-2.c: New test. * gcc.target/riscv/sat_s_add_imm-run-3.c: New test. * gcc.target/riscv/sat_s_add_imm-run-4.c: New test.a158d4a62etoa4a309a65ba4a309a65btoe3f0b908bde3f0b908bdto3c5a6648713c5a664871tod94a6e679ad94a6e679ato96fc69ad4996fc69ad49to94349e753894349e7538to21d83aae8221d83aae82tof478f87b34f478f87b34tocdf6a70098cdf6a70098to2ce17db7912ce17db791to0686b5c6630686b5c663to15dcaf2e0a15dcaf2e0ato20fb15446a20fb15446atob87e2885c3b87e2885c3to9ac4b3c30f9ac4b3c30fto5eb7654c875eb7654c87tof4b0983d0cf4b0983d0cto222eed535a222eed535ato464010e40c464010e40ctod8a77206c6d8a77206c6to1442c67dcd1442c67dcdtof53f680fecf53f680fecto000de1a040000de1a040to5be7aff9a65be7aff9a6tocfdbab0e61cfdbab0e61tob645e9dfdbb645e9dfdbto25a5b20a9225a5b20a92to24bc134873CI state: success ✅
CI bot tcwg_gnu_cross_build--master-aarch64 : CI bot tcwg_gnu_cross_build--master-aarch64: Build results
See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/25/artifacts/artifacts.precommit/notify/mail-body.txt
CI state: success ✅
CI bot tcwg_gnu_cross_build--master-arm : CI bot tcwg_gnu_cross_build--master-arm: Build results
See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/57/artifacts/artifacts.precommit/notify/mail-body.txt
CI state: success ✅
CI bot tcwg_gnu_cross_check_gcc--master-aarch64 : CI bot tcwg_gnu_cross_check_gcc--master-aarch64: Test results
See: https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/54/artifacts/artifacts.precommit/notify/mail-body.txt
24bc134873to1170bd27a8CI state: fail ❌
CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/169/ : CI bot tcwg_gnu_cross_build--master-arm: Patch failed to apply
See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/169/artifact/artifacts/jenkins/precommit-forge-apply.log
CI state: fail ❌
CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/143/ : CI bot tcwg_gnu_cross_build--master-aarch64: Patch failed to apply
See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/143/artifact/artifacts/jenkins/precommit-forge-apply.log
1170bd27a8f4162bbecdf4162bbecd55d8966902View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.