Re: [PATCH 6/7] MATCH: Factor out code that for min max detection with constants

2023-04-25 Thread Mikael Morin
Hello, diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 3b397ae2941..b8add24f874 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -150,6 +150,49 @@ static tree fold_convert_const (enum tree_code, tree, tree); static tree fold_view_convert_expr (tree, tree); static tree fold

[PATCH 6/7] MATCH: Factor out code that for min max detection with constants

2023-04-24 Thread Andrew Pinski via Gcc-patches
This factors out some of the code from the min/max detection from match.pd into a function so it can be reused in other places. This is mainly used to detect the conversions of >= to > which causes the integer values to be changed by one. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/Chang