Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2165 Broken comparison

closed
Borut Ražem
None
Front-end
5
2013-09-26
2013-05-19
No

There seems to be a bug related to the optimization of comparisons into and introduced by Borut in revision #6726. To reproduce, use the attached regression test. I noticed the bug in sdcc revision #8626.

Philipp

1 Attachments

Discussion

  • Borut Ražem
    Borut Ražem
    2013-05-25

    • status: open --> closed
    • assigned_to: Borut Ražem
     
  • Borut Ražem
    Borut Ražem
    2013-05-25

    Fixed in svn #8676 by by disabling optimization of comparison unsigned with 2^n literal since it is broken: it was already broken when introduced for the first time with patch #129 Summary of all uncommitted changes I applied on "my" SDCC.

    Borut

     
  • Maarten Brock
    Maarten Brock
    2013-09-26

    It looks to me like the optimization is not the bug, but it triggers a live range problem. When I compile the test case with --no-peep for mcs51 I see r7 being overwritten with the value for c to be propagated to the false case. But r7 still holds the msb of i here and still needs to be tested. Using any other register for the propagation would be ok.