https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126059
Bug ID: 126059
Summary: Missed novalake optimization of ++/-- and i128 + or -
constant/variable
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: kaelfandrew at gmail dot com
Target Milestone: ---
Created attachment 64908
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64908&action=edit
C code with assembly comments
https://godbolt.org/z/eKW8cb3xc
With -O3 -march=novalake, inc/dec for i8, i16, i32, i64 should optimize to:
{nf} inc eax, edi
or
{nf} dec eax, edi
add_cst_i128/sub_cst_i128/add_i128/sub_i128
should remove mov and do add rax, rdi, 10 and similar for other functions.
This is all optimize in Clang trunk.