Before the fare changes last month Dublin-Cork charged €35 peak and €20 off-peak, peak being defined as trains booked to serve full meals. No idea now.

Note that web fares officially cannot be upgraded. Also, as Mark states you are supposed to buy your upgrade before you board the train and you can otherwise be issued a €100 penalty fare. In reality however you can ask the train host who will normally be happy to let you pay on board.