Add TEST8ri_NOREX pseudo to constrain sub_8bit_hi copies.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 8 Oct 2011 18:28:28 +0000 (18:28 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 8 Oct 2011 18:28:28 +0000 (18:28 +0000)
commited744827041a97336461abdc91b43fd0eafb869c
treec0afdff591d94ef9b85d826b8b241fc4c16b19bc
parenta55f6575aede9a47ce95b4d195eae72e989cde19
Add TEST8ri_NOREX pseudo to constrain sub_8bit_hi copies.

In 64-bit mode, sub_8bit_hi sub-registers can only be used by NOREX
instructions. The COPY created from the EXTRACT_SUBREG DAG node cannot
target all GR8 registers, only those in GR8_NOREX.

TO enforce this, we ensure that all instructions using the
EXTRACT_SUBREG are GR8_NOREX constrained.

This fixes PR11088.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141499 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrArithmetic.td
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/norex-subreg.ll