The machine verifier enforces the property that no block is listed twice in the successor or predecessor list. For a function with the optnone function this is not always true after instruction selection. Example: > cat test.ll define void @bar() #0 { entry: br i1 undef, label %exit, label %exit exit: ret void } attributes #0 = { noinline optnone } > llc -verify-machineinstrs test.ll ... *** Bad machine code: MBB has duplicate entries in its successor list. *** ... I'm not sure why the machine verifier enforces this property, without the optnone attribute the codegenprepare appears to remove those pointless jumps though I am not sure yet whether this is on purpose to avoid the verification problems.
http://reviews.llvm.org/D12350 fixes this.
Fixed in r246074.