Cramer: Dollar Store Stocks Are 'Rising From the Ashes'

There is big potential upside in the stocks of beaten-down discount stores, CNBC's Jim Cramer said on"Squawk on the Street" Wednesday.

Cramer said that dollar stores have always had a "strong secular theme," and that "these stocks have a lot of room to run higher." Cramer said that investors can take signals from names like Dollar Tree, which posted significantly higher sales and profit on Wednesday.

"Obviously the headwinds are at Target," Cramer said. "The contrast here is between Target and Dollar Tree. The previous time the dollar companies reported, they said there would be margin pressure and there was none, margins actually expanded. Suddenly, you have a group that's beaten down and they're rising from the ashes."

"These were highly rated stocks by short funds," he added, noting that there is potential risk for these stocks with cuts in government spending to programs like food stamps.

"There is what is known as 'thesis shorting,' where the assumption was that the consumer was tapped out and you go after Dollar Tree. Suddenly the facts just don't fit in the way of the story," he said.

Furthermore, Cramer said, "Target has run and if you're going to run, you better deliver." Wal-Mart, Cramer said, "did deliver," listing it as a "stand out."

He also pointed to Home Depot as an indication of where retail is headed. Cramer called the recent earnings "one of the best I've seen, maybe one of the best this year," later in the show.

— By CNBC's Paul Toscano. Follow him on Twitter and get the latest stories from "Squawk on the Street" @ToscanoPaul