For all the talk of "Dems focus too much on social issues", McCrory would almost certainly have been re-elected had HB2 never been signed.
I think he would've won by a small razor thin margin if HB2 was signed or not. I think the NBA relocating the All Star Game was the final nail in his job. A lot of Charlotte business community rallied to stop McCory after that.
HB2, while a social issue, had a significant financial impact. (Let's not forget the funding that was to be pulled by the Department of Education.) Sinilarly, in a non-wave year, we likely would have seen Gregg come out on top in Indiana. RFRA, another social issue, was disastrous for businesses.