commit | d36696c4e0ccd10a91bad2e3383c50347e2ea5ec | [log] [tgz] |
---|---|---|
author | Evan Cheng <evan.cheng@apple.com> | Fri Oct 12 01:15:47 2012 +0000 |
committer | Evan Cheng <evan.cheng@apple.com> | Fri Oct 12 01:15:47 2012 +0000 |
tree | e7f718f97621f9099197ece766895a35ab8187f8 | |
parent | 5665a3dbc909c1450ac17e311977cbaf9025525b [diff] |
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165778 91177308-0d34-0410-b5e6-96231b3b80d8