Evan Cheng
76b896ec91
Legalizer optimize a pair of div / mod to a call to divrem libcall if they are
...
not legal. However, it should use a div instruction + mul + sub if divide is
legal. The rem legalization code was missing a check and incorrectly uses a
divrem libcall even when div is legal.
rdar://12481395
llvm-svn: 165778
2012-10-12 01:15:47 +00:00
Evan Cheng
5e3a175c65
Emit a single _udivmodsi4 libcall instead of two separate _udivsi3 and
...
_umodsi3 libcalls if they have the same arguments. This optimization
was apparently broken if one of the node was replaced in place.
rdar://11714607
llvm-svn: 158900
2012-06-21 05:56:05 +00:00
Nuno Lopes
944814b41a
revert my previous patches that introduced an additional parameter to the objectsize intrinsic.
...
After a lot of discussion, we realized it's not the best option for run-time bounds checking
llvm-svn: 157255
2012-05-22 15:25:31 +00:00
Nuno Lopes
e8880a9916
change the objectsize intrinsic signature: add a 3rd parameter to denote the maximum runtime performance penalty that the user is willing to accept.
...
This commit only adds the parameter. Code taking advantage of it will follow.
llvm-svn: 156473
2012-05-09 15:52:43 +00:00
Bob Wilson
d8856e17fe
Reenable use of divmod compiler_rt functions for iOS 5.0 and later.
...
llvm-svn: 141368
2011-10-07 16:59:21 +00:00
Bob Wilson
78011dcf2e
Remove test for iOS divmod function, since that is disabled for now.
...
llvm-svn: 130769
2011-05-03 17:54:49 +00:00
Evan Cheng
28877b11a2
Remove -use-divmod-libcall. Let targets opt in when they are available.
...
llvm-svn: 129884
2011-04-20 22:20:12 +00:00
Evan Cheng
b720f37282
Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand the node to a libcall. rdar://9280991
...
llvm-svn: 129633
2011-04-16 03:08:26 +00:00
Evan Cheng
859dff2c87
Change -arm-divmod-libcall to a target neutral option.
...
llvm-svn: 129045
2011-04-07 00:58:44 +00:00
Evan Cheng
830f695385
Add test case.
...
llvm-svn: 128707
2011-04-01 06:27:25 +00:00