Your employer should have already have included or excluded from the appropriate boxes on your W-2 any amounts listed in box 12. Specifically,
- the code C amount must be included in boxes 1, 3 (up to the SS wage base) and 5.
- the code P amount is not included in boxes 1, 3 or 5.
- the code DD amount is not included in boxes 1, 3 or 5.
Employee deferrals to a 401(k) (code D) are excluded from box 1 but must be included in boxes 3 (up to the SS wage base) and 5. Deferrals to a Roth 401(k) (code AA) are included in box 1, 3 (up to the SS wage base) and 5.
See the instructions for Form W-2: https://www.irs.gov/pub/irs-pdf/iw2w3_15.pdf