[LLVMdev] qualitative comparison of correctness of llvm and gcc

Duncan Sands duncan.sands at math.u-psud.fr
Mon Jul 21 00:20:24 PDT 2008


Hi John,

> A "volatile error" indicates a case where a compiler failed to respect
> the volatile invariant.  The volatile invariant is simply that changing
> the optimization level of a strictly conforming C program must not
> change the number of dynamic loads or stores to any variable that is
> volatile-qualified in the compiler's input.  We check this with a hacked
> valgrind (for x86) or a hacked simulator (for AVR).

does this also check that writes are atomic: that they are performed in
one processor operation?  For example, I recently fixed a bug where a
write of a double constant on x86-32 (which can be written atomically)
was being turned into a write of an i64, which then got legalized into
two i32 writes.

Ciao,

Duncan.



More information about the llvm-dev mailing list