I made backport of "Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects." (http://llvm.org/viewvc/llvm-project?view=revision&revision=175553) to llvm 3.1 and found that test from this fix contained incorrect "CHECK: ret". The “ret” doesn’t appear after all optimizations and CHECK doesn't find ret but finds the word "noreturn" in attributes, so FileCheck passes.
; Function Attrs: noreturn nounwind ssp uwtable define i32 @main() #1 { entry: tail call void @endless_loop() unreachable } attributes #0 = { noreturn nounwind readnone ssp uwtable } attributes #1 = { noreturn nounwind ssp uwtable }
The llvm 3.1 doesn't make attributes, so I found this inaccuracy.