[X86] Emit a reg-reg copy for fast isel of vector bitcasts.
authorCraig Topper <craig.topper@intel.com>
Thu, 25 Jun 2020 02:46:31 +0000 (19:46 -0700)
committerCraig Topper <craig.topper@intel.com>
Thu, 25 Jun 2020 03:15:21 +0000 (20:15 -0700)
commita5041987eddc21d37345d055cb7a51b3eb5ee698
tree3fc9d35419cb2593c1a12233ee88d367bfecde6f
parent6036bf53090e03537f7d06a8daecda84a72a9bc9
[X86] Emit a reg-reg copy for fast isel of vector bitcasts.

Previously we just updated a map and moved on. But it possible
we cached known bits information with the vreg that can be used by
another basic block. If the other basic block has a different view
of the VT these known bits won't make sense.

By emitting a copy we ensure we have different vregs before and
after the bitcast. This prevents the known bits from being used
with the wrong type.

Differential Revision: https://reviews.llvm.org/D82517
llvm/lib/Target/X86/X86FastISel.cpp
llvm/test/CodeGen/X86/fast-isel-bitcast-crash.ll [new file with mode: 0644]