This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR target/66824: Allow software FP SFmode in FP splitter


On Mon, Jul 13, 2015 at 6:09 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sun, Jul 12, 2015 at 10:56 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Sat, Jul 11, 2015 at 9:23 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Thu, Jul 09, 2015 at 01:58:22PM -0700, H.J. Lu wrote:
>>>> On Thu, Jul 09, 2015 at 12:13:38PM -0700, H.J. Lu wrote:
>>>> > ix86_split_long_move can optimize floating point constant move, which
>>>> > can be used to optimize SFmode move for IA MCU.
>>>> >
>>>> > OK for trunk if there is no regression?
>>>> >
>>>> >
>>>> > H.J.
>>>> > ---
>>>> > gcc/
>>>> >
>>>> >     PR target/66824
>>>> >     * config/i386/i386.c (ix86_split_to_parts): Allow SFmode move
>>>> >     for IA MCU.
>>>> >     (ix86_split_long_move): Support single move.
>>>> >     * config/i386/i386.md (FP splitter): Allow SFmode for IA MCU.
>>>> >
>>>> > gcc/testsuite/
>>>> >
>>>> >     PR target/66824
>>>> >     * gcc.target/i386/pr66824.c: New test.
>>>> > ---
>>>>
>>>>
>>>> I missed the testcase.  Here is the updated patch.
>>>>
>>>
>>> ix86_split_long_move can optimize floating point constant move, which
>>> can be used to optimize SFmode move with software floating point.
>>>
>>> OK for trunk if there are no regressions?
>>
>> No, this patch is wrong. Please investigate why "*movsf_internal"
>> doesn't use "?r/rmF" alternative in case FP regs are unavailable.
>> Perhaps you should add new alternative with a conditional constraint,
>> but without "?". And... please use:
>>
>
> I couldn't figure a way to add conditional constraints for "?r/rmF" and
> "r/rmF".   I simply disabled *movsf_internal if TARGET_HARD_FP_REGS
> is false and added a new "*movsf_internal_soft_fp" pattern.
>
> OK for trunk if there is no regressions?

No. We don't want duplicated patterns.

Please add two patterns at the end of the constraint string and use
enabled attribute to disable all others.

IMO, you will also need to apply similar change to a DFmode move.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]