[PATCH] [GVN} don't propagate equality comparisons of FP zero (PR22376)

Sanjay Patel spatel at rotateright.com
Thu Jan 29 11:40:30 PST 2015


In http://reviews.llvm.org/D7257#115344, @rnk wrote:

> Don't we have FP math flags for this? See FastMathFlags::noSignedZeros(). Looks like we don't have those on fcmp instrs, though.
>
> We should consider doing this folding if signed zeros are disabled.


I thought about making this conditional on the IR-level FMF, but as you noted, they don't apply to fcmp (or intrinsics; see http://llvm.org/bugs/show_bug.cgi?id=21290 ). So until we get FMF fixed, we'd have to rely on a function-level attribute (unsafe-fp-math I think; I don't see an NSZ equivalent).

Ok, if I just put a 'ToDo' comment in this patch for this?


http://reviews.llvm.org/D7257

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list