Skip to content

IR after optimization increases code instructions in loop #146648

@r00t0s

Description

@r00t0s

The code before optimization is more shorter than after optimization, when I use -O1 code looks correct, but when I use -O2 -O3 looks so bad, for example GCC have similar problem but only when used -O3

Example: -O1
https://godbolt.org/z/9nq3hd8ve

After use -O2 or -O3
https://godbolt.org/z/xYeKzveze

All versions of clang have the same problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    loopoptimquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!vectorizers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions