[Bug rtl-optimization/114215] New: GCC makes wrong decision for inline with -Os or -Oz to deal with trivial functions
unlvsur at live dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 3 02:53:31 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
Bug ID: 114215
Summary: GCC makes wrong decision for inline with -Os or -Oz to
deal with trivial functions
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: unlvsur at live dot com
Target Milestone: ---
This is a very common example for implementing a bounds checking vecotr index.
GCC makes the wrong decision. This even increases the code size but not
decreases the size compared to -O3.
GCC with -Oz
https://godbolt.org/z/sa9YYqnYY
GCC with -Ofast
https://godbolt.org/z/b6jahvh6s
clang with -Oz
https://godbolt.org/z/GxPaxP66b
More information about the Gcc-bugs
mailing list