Sorry for the late reply. Somehow did not see your Email.
I mean,

if (WN_kid0(loop_end) == tmp) {
    if (opr == OPR_LT) {
     ....                          --- you fixed here
   }
   ...
}
else {
   if (opr == OPR_LT) {
    .....                      --- looks like you miss here.
  }
......
}

________________________________
From: Hui Shi [mailto:kalin....@gmail.com]
Sent: Friday, August 13, 2010 9:29 PM
To: Ye, Mei; Sun Chan
Cc: open64-devel@lists.sourceforge.net
Subject: Re: [Open64-devel] Simd_Finalize_Loops bug in handling unsigned 
comparison loop end

Hi, Mei

I fix loop's end update in both branch.
Do you mean I miss fixing for the remainder loop's tart?
remainder_start = start + (((end-start) + 1)/vect)*vect, because end>=start has 
the do loop guard, I guess the start value is always correct.


2010/8/12 Sun Chan <sun.c...@gmail.com<mailto:sun.c...@gmail.com>>
if the fix need to be in multiple places, perhaps make a template out of that?
Sun

On Thu, Aug 12, 2010 at 9:27 AM, Ye, Mei 
<mei...@amd.com<mailto:mei...@amd.com>> wrote:
> Hello Kalin,
>
>
>
> Looks like you missed another place in Simd_Finalize_Loops that may require
> a similar fix.
>
>
>
> -Mei
>
>
>
> ________________________________
>
> From: Ju, Roy
> Sent: Wednesday, August 11, 2010 3:11 PM
> To: Ye, Mei
> Subject: FW: [Open64-devel] Simd_Finalize_Loops bug in handling unsigned
> comparison loop end
>
>
>
> Mei,
>
> See if you can review this changelist. Thanks.
>
>
>
> Roy
>
>
>
> From: Hui Shi [mailto:]
> Sent: Sunday, August 08, 2010 7:46 PM
> To:
> Subject: [Open64-devel] Simd_Finalize_Loops bug in handling unsigned
> comparison loop end
>
>
>
> Hi, All
>
>
>
> Can LNO gatekeeper help review this fix?
>
>
>
> This bug happens in -m32 on x8664 linux.
>
> Attached is the test case and patch.
>
> command line is
>
> opencc -O3 unsigned_loop_end.c -INLINE:ne=foo:ne=init:ne=check
> -OPT:unroll_times_max=1 -m32
>
>
>
> The bug happens when vectorization is happend on following loop.
>
>    int a[100]
>
>    int start;
>    unsigned i, end;
>    for( i = start; i < end; i++) {
>      a[i] = a[i+1];
>    }
>
> with -m64 unsigned comparison is transformed to signed comparison in
> STD_Canonicalize_Upper_Bound.
>
> with -m32 unsigned comparison is kept in LNO.
>
>
>
> will update loop_end align to vecotrize factor (vect)
>
> i <= start + (((end - start + 1) / vect) * vect) -1
> suppose start is 0, end is 2, vect is 4, original serial loop is
> for( i = 0; i < 2; i++)
> after Simd_Finalize_Loops transformation, simd loop becomes
> for(i = 0, i <= -1; i++),
>
> This loop will itreate 0xffffffff times.
>
>
>
> The fix is change loop end to following form when compraion is unsigned.
> i < start + (((end - start + 1) / vect) * vect)
>
>
>
>
>
> As discussed with Shuxin, we also doubt why SIMD loop's upper need aligned
> with vecotrized factor. Can SIMD only update loop's step?
>
> like  for(i = start, i <= end-1; i+= vector_factor)?
>
>
>
>
>
> Best Regards
>
> Shi, Hui
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net<mailto:Open64-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to