[PATCH] D25297: [DAG] use SDNode flags 'nsz' to enable fadd/fsub with zero folds

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 14:17:53 PDT 2016


spatel added a comment.

In https://reviews.llvm.org/D25297#575880, @spatel wrote:

> In https://reviews.llvm.org/D25297#575826, @echristo wrote:
>
> > This seems reasonable to me. I'd like to see something that adds the attribute to the instructions at some point, but as an intermediate step this is fine.
>
>
> Do you mean propagate the FMF flags on the returned SDNode? Eg:
>
>   return DAG.getNode(ISD::FNEG, DL, VT, N1, Flags);
>   
>
> Oops...I forgot to do that in *this* patch.


Although in my defense, putting the Flags on an FNEG is an academic exercise at this point because we only have FMF on binary SDNodes. The flags will be dropped in getNode() for the unary node.


https://reviews.llvm.org/D25297





More information about the llvm-commits mailing list