Skip to content

Infinite/exponential loop unswitch due to invariant condition injection #66868

Closed
llvm/llvm-project-release-prs
#705
@nikic

Description

@nikic

Running opt -passes='simple-loop-unswitch<nontrivial>' on https://gist.github.com/nikic/852fbcaa307231c3aa0a5cdc1f057ede does not finish after 5 minutes.

My attempt to reduce this resulted in https://gist.github.com/nikic/52d9fc05e986a4e9279620461fe54d26, which does finish after about 50 seconds, resulting in this output: https://gist.github.com/nikic/45fb4b1448caa7195618c5001874f8cc The first test case might not be infinite as well, just very slow.

This problem does not occur when -simple-loop-unswitch-inject-invariant-conditions=false is passed.

cc @serguei-katkov

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm:hangCompiler hang (infinite loop)

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions