This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LLVMdev] updated code size comparison

On 17 December 2009 21:53, Bill Wendling <> wrote:
> On Dec 16, 2009, at 1:26 AM, Paolo Bonzini wrote:
>> On 12/16/2009 03:21 AM, John Regehr wrote:
>>> Hopefully the results are more fair and useful now. ÂAgain, feedback is
>>> appreciated.
>> I would also avoid testcases using volatile. ÂSmaller code on these
>> testcases is often a sign of miscompilation rather than optimization.
>> For example,
>> is
>> miscompiled on GCC 3.4 and SunCC 5.10.
> Perhaps just leaving out those volatile tescases which are miscompiled on other platforms, since not every volatile testcase fails for all compilers. :-)
> -bw

Would it be possible for the test cases to detect if they have been
compiled wrongly, for example, check that volatile is actually
How about running the resulting compiled code is a small virtual
machine, that is configured to return a different value each time the
volatile variable is read. The test code could then read the volatile
variable twice and return a different result depending on whether the
two read values are different or not.
If the mis-compiled code only read the value once, having wrongly
optimized out the second read, the test would fail.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]