On 9/20/26 12:16 PM, Kyrylo Tkachov wrote:
This is what this patch 1 is intended to address:
The RTL in your message is the pre-patch result. On targets with conditional 
compares, expand_expr_real_gassign tries the generic conditional-compare 
expander before normal binary expansion. Without this patch, it treats each 
plain boolean as != 0, which sends the expression through the AArch64 CMP/CCMP 
hooks.
This patch rejects the all-boolean candidate before that expander emits any 
RTL. Expansion then falls through to the normal BIT_IOR_EXPR path. The initial 
RTL after the patch contains an ior:SI, which produces orr w0, w0, w1. It 
therefore starts with the same ordinary IOR form as the RISC-V expansion. Mixed 
chains still use conditional compares.
Thanks for clarifying.  I didn't realize there was some magic that rerouted IOR into that conditional compare path, I thought was something crazy in the aarch64 backend doing that.

Jeff

Reply via email to