Xazax-hun wrote:

> To me, simplifying a SymbolRef should never result in Unknown or Undef, 
> unless it was Unknown or Undef initially or, during simplification we 
> realized that it's a division by zero once we did the constant folding, etc.

I understand that we might not be ready for this, but feels like at some point 
we should have this as a form of an assertion. I am not sure about the `Undef` 
part because there are many ways to get to undef during constant folding 
(signed overflows, division by zero, OOB access of an array, defer of an 
invalid pointer). Even if some of those cannot happen during the current 
simplification they might be modeled later. So, I think a simpler "the result 
can only be Unknown if the input was also Unknown" would make a lot of sense to 
me. 

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

Reply via email to