[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] Testing floating point optimizations with CSmith

> Can you elaborate on it? My understanding is that the type you referred
to is the type passed to FunctionInvocation::make_random_binary? I am
trying to rephrase the question:

> In FunctionInvocation::make_random_binary, can we force the "type" to be
eInt if the kind of the generated "op" is a comparison operation?

That is exactly what I meant.

> The only easy way that I can think of is to make BinaryOpWorksForFloat
return false upon comparison operations.

This is what I did, but I was wondering if I could solve the problem 
without rejecting comparison operators.


l_2534[0][2][2] = (FLOAT_CMPGT_MACRO(l_2515[0][1] , 
(FLOAT_CMPGT_MACRO(l_2519[2][0][2] , l_2521))))/*sim lhs:float,, 
lhs_var:float,: rhs:float,*/;

l_2534 and l_2515 are arrays of floats, l_2521 is a float.
The comment at the end is telling me that types of lhs, lhs_var and rhs 
(expr) are all float. But actually rhs should be of type int, and I 
should cast it to float_interval in float_test mode.

Jacek Burys