arsenm wrote:

> I do think this change still makes sense, especially from a consistency point 
> of view. If SROA sets one of the value-based FMF flags (nsz) then it stands 
> to reason that it should also set the other two (nnan and ninf). Unless there 
> is some reason why nsz would be more problematic than nnan/ninf in this 
> context (it does have substantially different semantics).

nsz is more problematic and difficult to recover than nnan/ninf. Violations of 
no-nans no-infs can be treated as poison. nsz is fuzzier and just expands the 
set of permissible values, and is thus attached to specific operations and not 
recoverable from the inputs. You can't simply add some form of assertion that a 
value cannot be -0, in the way you could for a nan. 

It's not problematic to preserve nnan in the same way here, but it's also less 
important.

https://github.com/llvm/llvm-project/pull/114271
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to