[Bug rtl-optimization/107050] duplicate load of return value when facing multiple branches
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 27 09:20:31 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107050
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |segher at gcc dot gnu.org
Last reconfirmed| |2022-09-27
Known to fail| |13.0
Target| |x86_64-*-*
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. It's shrink-wrapping which is duplicating blocks and the load.
Before we have
1: NOTE_INSN_DELETED
5: NOTE_INSN_BASIC_BLOCK 2
2: ax:SI=di:SI
4: NOTE_INSN_FUNCTION_BEG
7: flags:CCZ=cmp(ax:SI,0)
8: pc={(flags:CCZ==0)?L27:pc}
REG_BR_PROB 536870916
9: NOTE_INSN_BASIC_BLOCK 3
10: ax:SI=[`f']
11: flags:CCZ=cmp(ax:SI,0)
12: pc={(flags:CCZ==0)?L24:pc}
REG_BR_PROB 708669604
13: NOTE_INSN_BASIC_BLOCK 4
14: flags:CCZ=cmp(si:SI,0)
15: pc={(flags:CCZ==0)?L19:pc}
REG_BR_PROB 719407028
16: NOTE_INSN_BASIC_BLOCK 5
17: ax:QI=0
18: call [`func_58'] argc:0
REG_EH_REGION 0
19: L19:
20: NOTE_INSN_BASIC_BLOCK 6
21: ax:SI=[`g_286']
38: pc=L27
39: barrier
24: L24:
25: NOTE_INSN_BASIC_BLOCK 7
26: [`g_286']=0
27: L27:
28: NOTE_INSN_BASIC_BLOCK 8
34: use ax:SI
40: NOTE_INSN_DELETED
maybe shrink-wrapping should consider splitting blocks before doing the
transform?
More information about the Gcc-bugs
mailing list