This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: wide-int, loop
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: Mike Stump <mikestump at comcast dot net>, "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>, Zdenek Dvorak <ook at ucw dot cz>
- Date: Tue, 26 Nov 2013 10:14:52 +0100
- Subject: Re: wide-int, loop
- Authentication-results: sourceware.org; auth=none
- References: <6D69A7D7-1E86-4477-81CD-EB8C3550E17C at comcast dot net> <CAFiYyc1Rv-W3Bd++ORkzNQJ=tgf5-9-AbxGYv6dtskHb84PUMg at mail dot gmail dot com> <52937178 dot 9050500 at naturalbridge dot com>
On Mon, Nov 25, 2013 at 4:49 PM, Kenneth Zadeck
<zadeck@naturalbridge.com> wrote:
>
> On 11/25/2013 06:04 AM, Richard Biener wrote:
>>
>> On Sat, Nov 23, 2013 at 8:22 PM, Mike Stump <mikestump@comcast.net> wrote:
>>>
>>> Richi has asked the we break the wide-int patch so that the individual
>>> port and front end maintainers can review their parts without have to go
>>> through the entire patch. This patch covers the loop code.
>>>
>>> Ok?
>>
>> @@ -2662,8 +2661,8 @@ iv_number_of_iterations (struct loop *loop, rtx
>> insn, rtx condition,
>> iv1.step = const0_rtx;
>> if (INTVAL (iv0.step) < 0)
>> {
>> - iv0.step = simplify_gen_unary (NEG, comp_mode, iv0.step, mode);
>> - iv1.base = simplify_gen_unary (NEG, comp_mode, iv1.base, mode);
>> + iv0.step = simplify_gen_unary (NEG, comp_mode, iv0.step,
>> comp_mode);
>> + iv1.base = simplify_gen_unary (NEG, comp_mode, iv1.base,
>> comp_mode);
>> }
>> iv0.step = lowpart_subreg (mode, iv0.step, comp_mode);
>>
>> separate bugfix?
>
> most likely. i will submit separately.
>
>> @@ -1378,7 +1368,8 @@ decide_peel_simple (struct loop *loop, int flags)
>> /* If we have realistic estimate on number of iterations, use it. */
>> if (get_estimated_loop_iterations (loop, &iterations))
>> {
>> - if (double_int::from_shwi (npeel).ule (iterations))
>> + /* TODO: unsigned/signed confusion */
>> + if (wi::leu_p (npeel, iterations))
>> {
>> if (dump_file)
>> {
>>
>> what does this refer to? npeel is unsigned.
>
>
> it was the fact that they were doing the from_shwi and then using an
> unsigned test.
Ah - probably a typo. Please just remove the "TODO".
Richard.
>> Otherwise looks good to me.
>>
>> Thanks,
>> Richard.
>
>