Re: Do not ICE when computing value range of ternary expression

2021-12-12 Thread Richard Biener via Gcc-patches
On December 12, 2021 9:35:00 PM GMT+01:00, Jan Hubicka via Gcc-patches wrote: >Hi, >In evaluate_conditions_for_known_args we use range_fold_unary_expr and >range_fold_binary_expr to produce value ranges of the expression. >However the expression also may contain ternary COND_EXPR on which we >ICE

Do not ICE when computing value range of ternary expression

2021-12-12 Thread Jan Hubicka via Gcc-patches
Hi, In evaluate_conditions_for_known_args we use range_fold_unary_expr and range_fold_binary_expr to produce value ranges of the expression. However the expression also may contain ternary COND_EXPR on which we ICE. I did not find interface to do similar folding easily on ternary exprs and since i