On 8/3/23 17:38, Vineet Gupta wrote:

;-)  Actually if you wanted to poke at zicond, the most interesting unexplored area I've come across is the COND_EXPR handling in gimple. When we expand a COND_EXPR into RTL the first approach we take is to try mov<mode>cc in RTL.

Unfortunately we don't create COND_EXPRs all that often in gimple. Some simple match.pd patterns would likely really help here.

The problem is RTL expansion when mov<mode>cc FAILs is usually poor at best.  So if we're going to add those match.pd patterns, we probably need to beef up the RTL expansion code to do a better job when the target doesn't have a mov<mode>cc RTL pattern.

Ok, I'll add that to my todo list.
You might want to reach out to Andrew Pinski if you do poke at this. I made a reference to this issue in a BZ he recently commented on. It was an x86 issue with cmov generation, but the same core issue applies -- we're not generating COND_EXPRs very aggressively in gimple.

jeff

Reply via email to