<div dir="ltr">Hi all,<div><div><br></div><div><div>LLVM optimization pass gives an error "Terminator found in the middle of a basic block!" since basic block IR may have multiple "ret" instructions. It seems LLVM does not accept multiple return in a basic block by default. </div></div><div><br></div><div>Is there a specific optimization or pass that I can enable to remove unreachable codes in basic blocks?<br></div><div><br></div><div>Best,<br></div><div><br></div><div>Aaron</div><div><br></div></div></div>