Hey Robin,
On 10/25/23 00:12, Robin Dapp wrote:
Hi Vineet,
I was thinking of two things while skimming the code:
- Couldn't we do this in the expanders directly? Or is the
subreg-promoted info gone until we reach that?
Following is the call stack involved:
expand_gimple_cond
do_compare_and_jump
emit_cmp_and_jump_insns
gen_cbranchqi4
riscv_expand_conditional_branch
riscv_emit_int_compare
riscv_extend_comparands
Last function is what introduces the extraneous sign extends, w/o taking
subreg-promoted into consideration and what my patch attempts to address.
- Should some common-code part be more suited to handle that?
We already elide redundant sign-zero extensions for other
reasons. Maybe we could add subreg promoted handling there?
Not in the context of this specific issue.
-Vineet