I too had this happen on my iPhone 5S after updating to iOS 8.4 while on vacation. I didn't find out that the majority of my music was missing (those tracks which were transferred from CD's and not from the iTunes store) until we got in the car to head home! What a drag!!! I could see that the music was on the iPhone as it was taking up over 25gb of memory, but only iTunes purchased tracks showed up in the app.
It turned out that re-syncing the iPhone with iTunes (i'm running 12.2.1) worked and all of my tracks are once again available on my iPhone.