The Programmers Guild, an IT worker interest group, has filed 300 discrimination complaints this year against companies alleged to have posted "H-1B visa holders only" ads on job boards.

These job ads are accused of disregarding the Immigration and Nationality Act, which makes it illegal to discriminate against U.S. workers on the basis of immigration status. Link

Edit: As one commentator quickly pointed out the example given below isn't correct. Thanks.
A quick web search revealed this ad from Kemma Software:

Kemma Software will consider H1-B visa holders only if they currently hold a visa to be transferred.

I am very much against such practices. The spirit and intent of H1-B is to get foreign help only when the company cannot get help it needs (at the price it wants or can afford) from the local job market. The motives of such ("H1-B visa holders only") companies are highly questionable.

Update: Interestingly a dice search revealed most companies mentioning H1-B are stating that they cannot sponsor H1-B and very few saying that they will consider it for exceptional candidates only.