[PATCH] Fix PR31096

Hurugalawadi, Naveen Naveen.Hurugalawadi@caviumnetworks.com
Thu Apr 14 06:46:00 GMT 2016


Hi,

>> I think we should handle at least INTEGER_CST and SSA_NAME 
>> with VRP, and it seems natural to add a VRP check 

The check should be added in the tree_single_nonzero_warnv_p
for SSA_NAME case for tree_expr_nonzero_p.
However, for tree_expr_nonnegative_p, its been handled in a 
different way. Should we combine this check with the existing one?

+   (if (!tree_expr_nonnegative_p (@1))
+    (cmp @2 @0))))))

>> Ideally, you would call tree_expr_nonpositive_p, except that that
>> function doesn't exist yet. So for now, I guess we

Would the tree_expr_nonpositive_p function be helpful for other cases
as well, I would try to add it if its useful.

Please find attached the modified patch as per the suggestions and
let me know if its fine?

Thanks,
Naveen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr31096-4.patch
Type: text/x-diff
Size: 2980 bytes
Desc: pr31096-4.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160414/28147803/attachment.bin>


More information about the Gcc-patches mailing list