The use of opioids alone does not significantly impair cognition in patients with HIV infection, but the combined use of opioids and antidepressants is linked to poorer neurocognitive performance.