https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121875

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by LuluCheng <[email protected]>:

https://gcc.gnu.org/g:d6ee89a65bd98b14940245ec79814ae3d38b0121

commit r16-4097-gd6ee89a65bd98b14940245ec79814ae3d38b0121
Author: Lulu Cheng <[email protected]>
Date:   Wed Sep 24 14:49:53 2025 +0800

    LoongArch: Implement TARGET_CAN_INLINE_P[PR121875].

    Because LoongArch does not implement TARGET_CAN_INLINE_P,
    functions with the target attribute set and those without
    it cannot be inlined.  At the same time, setting the
    always_inline attribute will cause compilation failure.

    To solve this problem, I implemented this hook. During the
    implementation process, it checks the status of the target
    special options of the caller and callee, such as the ISA
    extension.

            PR target/121875

    gcc/ChangeLog:

            * config/loongarch/loongarch.cc
            (loongarch_can_inline_p): New function.
            (TARGET_CAN_INLINE_P): Define.

    gcc/testsuite/ChangeLog:

            * gcc.target/loongarch/can_inline_1.c: New test.
            * gcc.target/loongarch/can_inline_2.c: New test.
            * gcc.target/loongarch/can_inline_3.c: New test.
            * gcc.target/loongarch/can_inline_4.c: New test.
            * gcc.target/loongarch/can_inline_5.c: New test.
            * gcc.target/loongarch/can_inline_6.c: New test.
            * gcc.target/loongarch/pr121875.c: New test.

Reply via email to