From renaming an ice cream flavor to flying the gay movement's rainbow flag, many American corporations celebrated Friday's U.S. Supreme Court decision to legalize same-sex marriage and said it made good sense for their businesses.

The broad support for the ruling from corporate leaders could complicate efforts by some state lawmakers and officials who are expected to try and limit gay marriage, despite the high court's decision.

"We applaud today's U.S. Supreme Court ruling on marriage equality, which will help families across the country, make it easier for businesses to hire and keep talented people, and promote both economic growth and individual freedom," Goldman Sachs Group said in a statement.

The investment bank, whose chief executive Lloyd Blankfein has long endorsed gay rights, also tweeted a photo of the LGBT movement's rainbow flag flying next to the U.S. flag in front of its New York City headquarters.

Companies could risk backlash from opponents of gay marriage.

One of the first reactions to Hilton Hotels' tweet of support for the Supreme Court ruling came from someone who said they would never stay at one of the company's hotels again.

In March, 379 companies and groups from various industries, including Google Inc, American Airlines Group Inc, Johnson & Johnson and sports teams such as the NFL's New England Patriots, signed on to a friend-of-the-court brief submitted to the Supreme Court in support of gay marriage.

When Indiana lawmakers earlier this year passed a bill that was attacked by gay rights groups as opening the door to discrimination on religious grounds, big employers, including automaker General Motors Co, weighed in against it. The law was modified.

Corporations in states that currently do not allow gay couples to wed linked their support for marriage equality to the competition for talent.

"As a matter of equality and human rights, and also a critical business imperative that plays a fundamental role in attracting and retaining the best and brightest team, it is quite simply the right thing to do," said Dow Chemical Chief Financial Officer Howard Ungerleider, who also is executive sponsor of GLAD (Gays, Lesbians and Allies at Dow). 

Barclays global diversity chief Mark McLane said: "inclusion benefits our business and the communities we serve."

GM said many employees were celebrating and the company supported them. Rival Ford Motor Co said "diversity and inclusion are key components of our business strategy."

American Airlines called the decision an historic moment for the country. In March, it sent a newsletter to employees saying to attract and retain the best people, it needed to offer consistent benefits and policies.

"We can't lose candidates because they aren't offered equal benefits under a specific state law," diversity managing director Mike Waldron wrote at the time. "Beyond being the right thing to do, administering different benefit processes and policies requires additional time, resources and expenses."

Ice cream maker Ben & Jerry's said on Friday that the movement for marriage equality was "on an unstoppable roll." It said that to celebrate the Supreme Court's decision it was renaming its Chocolate Chip Cookie Dough flavor "I Dough, I Dough" for the summer.