<div dir="ltr">This should be fixed in r222104.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 16, 2014 at 11:51 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Alright, I'll fix this. Sorry for the breakage!</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 16, 2014 at 8:28 AM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 16.11.2014 17:02, Sebastian Pop wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Nov 16, 2014 at 4:19 AM, Tobias Grosser <<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 16.11.2014 08:30, David Majnemer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Author: majnemer<br>
Date: Sun Nov 16 01:30:35 2014<br>
New Revision: 222093<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222093&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=222093&view=rev</a><br>
Log:<br>
ScalarEvolution: HowFarToZero was wrongly using signed division<br>
<br>
HowFarToZero was supposed to use unsigned division in order to calculate<br>
the backedge taken count. However, SCEVDivision::divide performs signed<br>
division. Unless I am mistaken, no users of SCEVDivision actually want<br>
signed arithmetic: switch to udiv and urem.<br>
</blockquote></blockquote>
<br>
findArrayDimensionsRec requires signed division in case Step is negative:<br>
<br>
// Normalize the terms before the next call to findArrayDimensionsRec.<br>
const SCEV *Q, *R;<br>
SCEVDivision::divide(SE, Term, Step, &Q, &R);<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This fixes PR21578.<br>
</blockquote>
<br>
<br>
This commit breaks a delinearization test case in polly.<br>
<br>
</blockquote>
<br>
Tobi, could you say which testcase broke?<br>
</blockquote></span>
FAIL: Polly :: Isl/Ast/simple-run-time-<u></u>condition.ll (160 of 391)<br>
<br>
<br>
; CHECK: ({{(q == 100 && o <= 0|o <= 0 && q == 100)}})<br>
^<br>
<stdin>:8:5: note: scanning from here<br>
if ((o >= 1 && q == 0) || (o <= 0 && q == -2305843009213693852) ? 1 : 0)<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I copied Sebastian who originally wrote the divide operation exactly as part<br>
of our delinearization analysis. He is possibly the best person to comment<br>
on this.<br>
<br>
</blockquote>
<br>
Most likely we will need to duplicate the code of SCEVDivision into a<br>
SCEVUDivide.<br>
The code that reused SCEVDivide contains this comment that expects SCEVDivision<br>
to perform an unsigned division:<br>
</blockquote>
<br></span>
This is my feeling as well.<br>
<br>
Cheers,<br>
Tobias<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>