llvm-diff Assertion `!Result && "structural differences second time around?"' failed.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```llvm
;a.ll
define i1 @f(i32 %a, i32 %b) {
entry:
%x = icmp eq i32 %a, 0
%y = icmp eq i32 %b, 0
%and = and i1 %x, %y
ret i1 %and
}
;b.ll
define i1 @f(i32 %a, i32 %b) {
entry:
%x = icmp eq i32 %a, 0
%y = icmp eq i32 %b, 0
%and = and i1 %y, %x
ret i1 %and
}
```
```console
$ llvm-diff a.ll b.ll
in function f:
in block %entry:
in instruction %and / %and:
operands %x and %y differ
llvm-diff: llvm/tools/llvm-diff/lib/DifferenceEngine.cpp:268: void (anonymous namespace)::FunctionDifferenceEngine::unify(const Instruction *, const Instruction *): Assertion `!Result && "structural differences second time around?"' failed.
Aborted (core dumped)
```
Contributor guide
Research direction
Start by reproducing the crash with the provided a.ll and b.ll inputs using llvm-diff. Read llvm/tools/llvm-diff/lib/DifferenceEngine.cpp around line 268 and trace FunctionDifferenceEngine::unify; done means the operand-order difference is reported without triggering the assertion or aborting.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100