The event doctor diagnosed Raonic with a pinched nerve in his right foot after the match. The Thornhill, Ont., native is scheduled to play at the French Open, which begins May 24.
"It was a good match for what it was," said Raonic. "I just tried to fight through, considering the situation. I tried to make the most of the opportunities and considering everything, it was pretty good.
"I want to make sure that the next time I step out on court, I'm 100 per cent and can make the most of the challenges ahead of me."
World No. 3 Murray hit 19 winners and saved all five break points faced in the one hour 41-minute match. In Madrid for a ninth time and a champion in 2008, Murray reached his 23rd ATP World Tour semifinal. He will next face last year's runner-up Kei Nishikori.
"I feel like I've been moving well," said Murray. "The first couple of weeks on the clay, I tried to work on it quite a lot in my training block before I started playing the tournaments.
"Because I feel healthy this year, I'm not worrying about my back or worrying about things when I am put in difficult positions on court. That obviously gives me a bit more confidence in the movement."
In the last match of the day, the fourth seed Kei Nishikori beat David Ferrer 6-4, 6-2.
Nishikori hit 22 winners and capitalized on five of his six break point opportunities in the 72-minute match. The Japanese star extended his unbeaten record on clay this year to eight matches as he reached his fifth ATP World Tour semifinal.
Earlier Friday, Serena Williams was beaten in the semifinal of the women's tournament, a short time after Maria Sharapova also lost.
Petra Kvitova defeated the top-ranked Williams 6-2, 6-3, while Svetlana Kuznetsova ousted Sharapova 6-2, 6-4.
The victory was Kvitova's first against Williams, a 19-time Grand Slam champion.
"I'm just exhausted today," said Williams, who had her serve broken six times. "But it's really good preparation for Roland Garros."
Kuznetsova beat Sharapova for the first time in seven years, breaking her opponent's serve three times and saving the one break point she faced.
"I'm just happy to be in the final," said Kuznetsova, who had never before even reached the semifinals at the Madrid tournament.
Sharapova, who could have returned to No. 2 in the rankings with a victory, said she wasn't able to take advantage of Kuznetsova's second serves like she had done previously.
"Today she had much more pop on her ball than I did, while I felt my shots were a bit too flat," Sharapova said. "I also think the court and the bounce, with the altitude here, meant her spin was getting really high."
Kuznetsova, who will be playing in her first final in nine months, is 1-3 against Kvitova but beat the Czech on clay last year at the French Open in their last meeting.Suggest a correction