LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1315 - SimplifyLibCalls misses optimization
Summary: SimplifyLibCalls misses optimization
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Interprocedural Optimizations (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-08 08:28 PDT by Reid Spencer
Modified: 2010-02-22 12:52 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Spencer 2007-04-08 08:28:36 PDT
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.
Comment 1 Chris Lattner 2007-04-08 13:12:13 PDT
Fixed, patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070402/047003.html