Skip to content

[phase ordering] opt --std-compile-opts misses optimizations on first pass #2441

@llvmbot

Description

@llvmbot
Bugzilla Link 2069
Version trunk
OS Linux
Attachments Poorly optimized test case (hacked up pcregrep).
Reporter LLVM Bugzilla Contributor
CC @nlewycky

Extended Description

(I'm not sure whether I should consider this a bug, feedback appreciated)

On the given test file opt is significantly more effective (in terms of emmitted bytecode size) when run twice.

--
ddunbar@ozzy:lli$ llvm-as -o=- pcregrep.ll | opt --std-compile-opts | llvm-dis | wc -l
1011
ddunbar@ozzy:lli$ llvm-as -o=- pcregrep.ll | opt --std-compile-opts | opt --std-compile-opts | llvm-dis | wc -l
77

Sorry for the complexity of the test case, it is hand trimmed from an llvm built pcregrep and there is a lot of dead code in the initial test. I don't have an easy way to trim further while still reproducing the bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions