llvm / llvm/llvm-project

[InstCombine] LLVM ERROR: Instruction Combining did not reach a fixpoint after 1 iterations

Open
#213,857 2 comments 0 reactions 1 assignee Claimed by @IamYJLee View on GitHub
confirmed crash-on-valid llvm:instcombine
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Compiler Explorer: https://godbolt.org/z/bjWK99aM7

The following code fails InstCombine with `Instruction Combining did not reach a fixpoint after 1 iterations`:

```llvm
; opt -passes=instcombine -disable-output small.ll
target datalayout = "e-n64"

define void @f(i64 %s) {
entry:
br label %loop

loop:
%a = phi i8 [ 0, %entry ], [ %t, %loop ]
%b = phi i64 [ 0, %entry ], [ %s, %loop ]
%se = sext i8 %a to i64
%or = or i64 %b, %se
%t = trunc i64 %or to i8
%c = icmp eq i64 %s, 0
br i1 %c, label %loop, label %exit

exit:
ret void
}
```

```console
$ opt -passes=instcombine -disable-output small.ll
LLVM ERROR: Instruction Combining did not reach a fixpoint after 1 iterations
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.