After Chris' round of changes to SimplifyLibCalls, it is now missing an optimization that it previously performed, as identified by this test case failing: FAIL: /proj/llvm/llvm-1/test/Transforms/SimplifyLibCalls/SPrintF.ll: child process exited abnormally %r4 = call i32 (i8*, i8*, ...)* @sprintf( i8* %target_p, i8* %fmt1_p, i8* %hello_p ) ; <i32> [#uses=1] %r4.1 = call i32 (i8*, i8*, ...)* @sprintf( i8* %target_p, i8* %fmt1_p, i8* %p ) ; <i32> [#uses=1] %r5 = call i32 (i8*, i8*, ...)* @sprintf( i8* %target_p, i8* %fmt2_p, i32 82 ) ; <i32> [#uses=1] Some of these are important for performance. For example, the first one should be reduced to a few stores.
Fixed, patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070402/047003.html