Always false stack checks are not eliminated - fix on the way

Simon Marlow marlowsd at
Mon Oct 21 11:02:38 UTC 2013

Have a look at the other tests in codeGen/should_gen_asm.  They compare 
the asm output against a sanitized template, so that we can spot if 
we're not generating a similar instruction sequence.  It's not ideal for 
a number of reasons (platform-dependence being the main one), but it's 
better than nothing.  Feel free to do something better :-)


On 21/10/2013 11:50, Jan Stolarek wrote:
> I can do that, but I'm not sure how to write such a test. Should I just grep for (Sp < SpLim) in
> the cmm dump and fail the test when I find such a line? I have not yet figured out a way of
> writing tests for Cmm-related things. I can't just compare expected Cmm dumps due to unique
> labels and identifiers.
> Janek
> Dnia poniedziałek, 21 października 2013, Simon Marlow napisał:
>> On 17/10/2013 23:11, Jan Stolarek wrote:
>>> Hi guys,
>>> I accidentally introduced a bug in one of my recent commits (
>>> 94125c97e49987e91fa54da6c86bc6d17417f5cf): stack checks of the form
>>> if (Sp < SpLim) goto cUP; else goto cUQ;
>>> are not eliminated in the Cmm. I have a fix, but need to validate it and
>>> update the comments. It will be ready tomorrow.
>> Thanks for fixing this.  Would you mind also adding a test so that we
>> notice if it gets broken in the future?  This would be a good test to
>> put in codeGen/should_gen_asm.
>> Cheers,
>> Simon

More information about the ghc-devs mailing list