Skip to content

Instcombine hangs with "opt -functionattrs -disable-basicaa -O1" #43886

@mikaelholmen

Description

@mikaelholmen
Bugzilla Link 44541
Resolution FIXED
Resolved on Feb 10, 2020 02:36
Version trunk
OS Linux
Blocks #43900
Attachments bbi-37458_x86.ll reproducer
CC @davidbolvansky,@zmodem,@RKSimon,@nikic,@rotateright
Fixed by commit(s) a148b9e

Extended Description

Running
opt -functionattrs -disable-basicaa -O1 -S -o - ./bbi-37458_x86.ll
seems to hang forever.

Adding -debug-pass=Executions shows

[2020-01-14 15:08:50.872376271] 0x611e690 Executing Pass 'Combine redundant instructions' on Function 'test_sub3_4'...

and adding -debug gives repeated occurences of

IC: Visiting: %_tmp2687 = select i1 %1808, i16 0, i16 %_tmp2685
IC: Visiting: %1808 = icmp sgt i16 0, %_tmp2685
IC: Mod = %1808 = icmp sgt i16 0, %_tmp2685
New = %1808 = icmp slt i16 %_tmp2682, 0
IC: ADD: %_tmp2687 = select i1 %1808, i16 0, i16 %_tmp2685
IC: ADD: %1808 = icmp slt i16 %_tmp2682, 0
IC: Visiting: %1808 = icmp slt i16 %_tmp2682, 0
IC: Visiting: %_tmp2687 = select i1 %1808, i16 0, i16 %_tmp2685

I've tried to reduce the command line to some minor variation of just
opt -instcombine
but I can't seem to manage that. :/

The problem seems to be fairly old, I've seen it in builds from around late March 2019.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions