My experience has been that this will vary with the same airline too; in the past, some upgrades received first-class bonus credit, others did not (these were both upgrades to first using a Mileage Plus award; comped upgrades and upgrades using 500 & 100 mile coupons). Did not see any rhyme or reason to which got the bonus & which didn't but was told by United that none were supposed to get it.
On one past American award flight, I was asked if I wanted to use coupons to upgrade (not supposed to be able to do that) and I said sure. However he rebooked me, I got miles for the free flight and first class bonus..