On Sat, Aug 19, 2017 at 1:38 AM, Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx> wrote: > Hi, > > It seems that the function bool_value() in sparse-llvm does not work > if the value is floating point. A more specific conversion is > necessary for floating point to boolean value. I guess you don't have the patch https://github.com/lucvoo/sparse/commit/bbbd9f179579a6cea6d8b2ae731fade5ec9a9ee8 and maybe also a whole series dealing with booleans. If you have any doubt, you can always use my sssa-next on a test case, this tree contains most of the LLVM fixes, plus others stuff and the new SSA. With code: _Bool foo (float a) { return a; } You get: ; ModuleID = '<stdin>' source_filename = "sparse" define i1 @foo(float %ARG1.) { L0: %R2. = fcmp une float %ARG1., 0.000000e+00 ret i1 %R2. } which is the correct code -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html