Fix for PR29010
authorMarina Yatsina <marina.yatsina@intel.com>
Wed, 17 Aug 2016 19:07:40 +0000 (19:07 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Wed, 17 Aug 2016 19:07:40 +0000 (19:07 +0000)
commit53ce3f9d023e6688cdc3f2c687199d266c82f68c
tree8e1fa6326b87728dc749d9bf1e63ba765e382635
parent6ad7dfcc1e69f9b7e95af3bf7a7f414dad97a124
Fix for PR29010

This is a fix for https://llvm.org/bugs/show_bug.cgi?id=29010
Root cause of the bug is that the register class of the machine instruction operand does not fully reflect if this registers that can be allocated.
Both for i386 and x86_64 the operand's register class is VR128RegClass and thus contains xmm0-xmm15, though in i386 we can only use xmm0-xmm8.
In order to get the actual allocable registers of the class we need to use RegisterClassInfo.

Differential Revision: https://reviews.llvm.org/D23613

llvm-svn: 278954
llvm/lib/CodeGen/ExecutionDepsFix.cpp
llvm/test/CodeGen/X86/pr29010.ll [new file with mode: 0644]