[CodeGen] Fix a trivial type conversion bug dating back to pre-2008
authorJames Molloy <james.molloy@arm.com>
Fri, 19 Aug 2016 08:38:50 +0000 (08:38 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 19 Aug 2016 08:38:50 +0000 (08:38 +0000)
commit7ee640f9b67e3269f19bbe166bbba6a93c0ee148
tree2c685d2803a7a7030ac3be420c5e3d06488a7530
parentb81960a6c858b4d40d64798cac3e56ca8e6383fa
[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.

llvm-svn: 279223
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/AArch64/fptouint-i8-zext.ll [new file with mode: 0644]