llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.86k stars 11.48k forks source link

SROA crash (fuzz testing) #29764

Open pogo59 opened 7 years ago

pogo59 commented 7 years ago
Bugzilla Link 30416
Version trunk
OS Windows NT
Attachments Traceback from assertion
CC @hfinkel

Extended Description

Fuzz testing got this crash; bugpoint-reduced IR file attached. I admit it looks pretty bogus, the original IR is not quite so stupid. But a crash is a crash, so I figured I'd file it anyway.

$ cat SROA-crash.ll ; ModuleID = 'bugpoint-reduced-simplified.bc' ; source_filename = "bugpoint-output-0a7776e.bc" target triple = "x86_64-scei-ps4"

; Function Attrs: norecurse noreturn nounwind define void @​autogen_SD998899922() #​0 { CF419: %A4 = alloca <4 x i64>, align 32 br label %CF434

CF434: ; preds = %CF434, %CF419 br label %CF434

CF449: ; preds = %CF449 br label %CF449

CF423: ; preds = %CF423 store <4 x i64> %L38, <4 x i64> %A4, align 32 %L38 = load <4 x i64>, <4 x i64> %A4, align 32 store <4 x i64> zeroinitializer, <4 x i64>* %A4, align 32 br label %CF423 }

attributes #​0 = { noreturn nounwind } $ opt -sroa SROA-crash.ll -S -o output.ll opt: /home/probinson/projects/llvm-org/trunk/llvm/lib/IR/Value.cpp:373: void llv m::Value::replaceAllUsesWith(llvm::Value*): Assertion `!contains(New, this) && " this->replaceAllUsesWith(expr(this)) is NOT valid!"' failed.

(full log attached)

llvmbot commented 6 years ago

posted potential fix on Phabricator https://reviews.llvm.org/D43544