Loki's allegiances have flip-flopped so frequently over the course of his MCU tenure that it wouldn't be surprising if he went full evil or became a legit anti-hero.
The latter seems a little more likely given his flirtation with the good side in Thor: The Dark World, and considering that the film also teased him being killed off, maybe it'll actually happen for good in Infinity War.
After all, Thanos might just be fed up with the pesky Asgardian's antics, so don't be surprised if Loki redeems himself in an act of self-sacrifice that finally cements his status as a reluctant hero.
Infinity War accounts for the fifth film of Tom Hiddleston's six-movie contract, but it's worth noting that Marvel isn't obliged to carry-out all six of these movie options, and could easily kill Loki off, bringing the actor's tenure to a premature close.
Considering how gingerly he's slunk in and around death to date, it wouldn't exactly be shocking if someone finally put him to rest for good.