OSDN Git Service

[AVX-512] Fix a bad use of a high GR8 register after copying from a mask register...
authorCraig Topper <craig.topper@gmail.com>
Sun, 12 Mar 2017 03:37:37 +0000 (03:37 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 12 Mar 2017 03:37:37 +0000 (03:37 +0000)
commit2e124a6c7cf70333e9e49b018c3a553eeb2c2653
tree3fb7cfe5b7387f490dbdf5bb2933901d314af2df
parenta168e94d13cfb6c9d64744947dd408340efced67
[AVX-512] Fix a bad use of a high GR8 register after copying from a mask register during fast isel. This ends up extracting from bits 15:8 instead of the lower bits of the mask.

I'm pretty sure there are more problems lurking here. But I think this fixes PR32241.

I've added the test case from that bug and added asserts that will fail if we ever try to copy between high registers and mask registers again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297574 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/pr32241.ll