https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94665
--- Comment #18 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> --- (In reply to Segher Boessenkool from comment #17) > [ Please don't add other email addresses for me; I get enough mail already, > I don't need all bugzilla mail in duplicate :-) ] OK > (In reply to z.zhanghaij...@huawei.com from comment #16) > > Ok, I will create a new PR to track this bug, and I will submit a bugfix > > patch whit that PR. > > You can make this PR RESOLVED again, after you made a new PR. OK, the new PR is PR94708, I will make this PR RESOLVED. > > > In addition, I tracked the process of generating fmaxnm/fminnm and found > > that it was generated in phiopt (minmax_replacement) and if-conversion > > (noce_try_minmax). In the rtl combine, only fminnm can be generated. Is it > > necessary for us to improve this optimization in the rtl combine using the > > above patch in stage1? > > Yeah, ifcvt will often do it. > > combine can handle max just fine as well; you'll need to track down why > it doesn't here (I noticed it doesn't as well, it wasn't immediately > obvious to me what the difference with the min case is). I will continue to track why fmaxnm is not generated.