From: Julian Seward Date: Sat, 8 Nov 2008 15:14:01 +0000 (+0000) Subject: Use a "sided" comparison rather than a "point" comparison, so as to X-Git-Tag: svn/VALGRIND_3_4_0~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8eb2c86b415e335146deec1e115432a5868c30f;p=thirdparty%2Fvalgrind.git Use a "sided" comparison rather than a "point" comparison, so as to ensure that gcc generates only one conditional jump per conditional expression, not two. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8743 --- diff --git a/memcheck/tests/fprw.c b/memcheck/tests/fprw.c index f60038e895..6eb304d2ff 100644 --- a/memcheck/tests/fprw.c +++ b/memcheck/tests/fprw.c @@ -13,8 +13,8 @@ int main ( void ) int* ip = (int*)0x1234567; d += 1.0; f += 10.0; - *dp += ( d ? 2.0 : 3.0 ); - *fp += ( f ? 20.0 : 21.0 ); + *dp += ( d > 0.1 ? 2.0 : 3.0 ); + *fp += ( f > 0.1 ? 20.0 : 21.0 ); free(dp); free(fp); *dp += 3.0;