https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66010
vries at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Missed optimization after |[6 Regression] Missed |inlining va_list parameter |optimization after inlining | |va_list parameter --- Comment #3 from vries at gcc dot gnu.org --- Before postponing expansion of va_arg to pass_stdarg, we had at pass_stdarg: ... f2: va_list escapes 0, needs to save 8 GPR units and 0 FPR units. Pass statistics: ---------------- f2 (intD.6 iD.1840) { struct apD.1844[1]; unsigned intD.9 _6; voidD.41 * _7; sizetype _8; voidD.41 * addr.1_9; unsigned intD.9 _10; voidD.41 * _11; voidD.41 * _12; voidD.41 * addr.1_13; intD.6 _14; ;; basic block 2, loop depth 0, count 0, freq 10000, maybe hot ;; prev block 0, next block 3, flags: (NEW, REACHABLE) ;; pred: ENTRY [100.0%] (FALLTHRU,EXECUTABLE) # .MEM_2 = VDEF <.MEM_1(D)> # USE = nonlocal escaped # CLB = nonlocal escaped { D.1844 } __builtin_va_startD.1030 (&apD.1844, 0); # VUSE <.MEM_2> _6 = MEM[(struct *)&apD.1844].gp_offsetD.2; ... Already after early inline, we have the desired: ... # .MEM_2 = VDEF <.MEM_1(D)> # USE = anything # CLB = anything __builtin_va_startD.1030 (&apD.1844, 0); # VUSE <.MEM_2> _8 = MEM[(struct *)&apD.1844].gp_offsetD.2; ... So, this is a regression.