[cfe-dev] CodeGen/atomic.c fails on 64-bit systems
sebastian.redl at getdesigned.at
Sat May 9 10:38:17 CDT 2009
The test CodeGen/atomic.c fails on 64-bit systems. It expects three
calls to llvm.atomic.cmp.swap.i32, but one of these cmp-swap calls is
done on pointers, so obviously results in an i64 version to be called on
There are several solutions I can see:
1) Force the test to a 32-bit target.
2) Do the test twice, once for 32-bit and once for 64-bit, and do
different greps in the two cases.
3) Somehow change the greps based on target.
4) Remove the .i32 suffix on the grep for cmp.swap. We'd then also have
to filter declarations out, or we get the wrong count.
I personally would favor option 4. Change this line of the RUN:
// RUN: grep @llvm.atomic.cmp.swap.i32 %t1 | count 4 &&
// RUN: grep @llvm.atomic.cmp.swap %t1 | grep -v declare | count 3 &&
More information about the cfe-dev