[PATCH] D12603: Use fixed-point representation for BranchProbability

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 10:53:16 PDT 2015


On Tue, Sep 8, 2015 at 9:39 AM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > On 2015-Sep-05, at 22:41, David Li <davidxl at google.com> wrote:
> >
> >
> > ================
> > Comment at: test/Analysis/BlockFrequencyInfo/basic.ll:71
> > @@ -70,3 +70,3 @@
> > ; The 'case_c' branch is predicted more likely via branch weight
> metadata.
> > -; CHECK-NEXT: case_c: float = 0.8,
> > +; CHECK-NEXT: case_c: float = 0.8
> > case_c:
> > ----------------
> > where does the coma come from?
>
> The comma was there to confirm that we get *exactly* 0.8.  Why has
> that changed?
>

With fixed point representation, we won't get exactly 0.8 here
but 0.8000000001. Should I restrict the output precision when printing this
value, or use regex or exact 0.8000000001 in the test case?


Cong


>
> (I'm behind on this review; maybe the answer is obvious from the patch,
> but it seems suspicious.  I'll try to get to this today or tomorrow.)
>
> >
> >
> > http://reviews.llvm.org/D12603
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150908/7e2cef5c/attachment.html>


More information about the llvm-commits mailing list