| Issue |
244291
|
| Summary |
[fuzzer-found] SandboxVectorizer produces IR with an SSA dominance violation
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
PiesAvalon
|
We found this crash using a fuzzer we are developing to test LLVM optimization passes.
On LLVM 23.1.6 (stock release build), the following IR passes `opt -passes=verify`:
```llvm
define void @f(ptr %from, ptr %to) {
entry:
%from_1 = getelementptr double, ptr %from, i64 1
%v0_2 = load double, ptr %from_1, align 4
%v0_1 = load double, ptr %from, align 4
%v1_1 = fadd double 0.000000e+00, %v0_1
store double %v1_1, ptr %to, align 4
%v1_2 = fadd double %v0_1, %v0_2
%to_2 = getelementptr double, ptr %to, i64 1
store double %v1_2, ptr %to_2, align 4
ret void
}
```
Running `opt -passes=function(sandbox-vectorizer) -verify-each -disable-output repro.ll` fails with:
```
Instruction does not dominate all uses!
%Unpack = extractelement <2 x double> %VecL, i32 0, !sandboxvec !0
%Pack = insertelement <2 x double> <double 0.000000e+00, double poison>, double %Unpack, i32 1, !sandboxvec !0
LLVM ERROR: Broken function found after pass "SandboxVectorizerPass", compilation aborted!
```
The pack/unpack pair created for the vectorized bundle ends up in blocks that do not dominate their uses. The pass does not exist in LLVM 22.1.8, so this is new in 23.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs