The Dodd-Frank law spawned thousands of pages of rules designed to make banks safer. Now, with President Donald Trump looking to undo much of that legislation, banks are scurrying to prepare their wish lists.

It isn’t an easy task, in part because many bank executives say the sprawling law did some good, helping restore confidence in both bank balance sheets and the financial system. But it also has added costs and restrictions they say have hurt profits and restricted lending.

Banks and investors reacted positively Friday to the White House’s proposal to gut the 2010 Dodd-Frank financial overhaul act. Shares of the biggest lenders rose between 3% and 6% on investor hopes that banks’ costs would drop sharply and that the deregulatory moves could boost lending revenue and economic growth.

Morgan Stanley was the top big-bank gainer, in part because it could benefit not just from changes to Dodd-Frank but also from a separate move by the Trump administration Friday to effectively kill the so-called fiduciary rule governing financial advisers. Morgan Stanley has one of the biggest financial-adviser networks in the U.S.

Despite the initial banker euphoria, some executives counseled patience, saying the overall impact of Dodd-Frank should be studied further before dramatic changes are made. Many prefer slowly unwinding regulations a few at a time, rather than a ripping-off-the-bandage approach that could add uncertainty and concerns about a return to precrisis practices.