He is scheduled for an MRI on Friday, manager Torey Lovullo said.
"It's not too bad,'' Greinke said. "Just didn't seem like a good idea to try to push it.''
The right-hander was rolling before exiting. He allowed just four hits and no runs in 7⅔ innings pitched. The Diamondbacks prevailed 11-1, and Greinke earned the win to improve to 6-1 this season.
Greinke said the current situation seems less serious than the left oblique injury that cost him six weeks in 2016, though he thought about that at first.
"I just knew something was wrong and didn't want to take the chance of hurting it more,'' he said. "At first I thought it was an oblique thing, but it seems to be in a different spot.''
Greinke has allowed one or fewer runs in five of his past six starts, and he has a 2.78 ERA this season.
He finished Wednesday's contest with five strikeouts, just three shy of 2,500 for his career. He would become fifth active pitcher to reach 2,500 K's, joining CC Sabathia, Justin Verlander, Max Scherzer and Felix Hernandez.
Information from the Associated Press was used in this report.