[CodeGen] Fix a trivial type conversion bug dating back to pre-2008

The heuristic above this code is incredibly suspect, but disregarding that it mutates the cast opcode so we need to check the *mutated* opcode later to see if we need to emit an AssertSext or AssertZext node.

Fixes PR29041.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279223 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed