When creating X86 MUL8 and DIV8 instructions, make sure we don't produce
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 26 Jun 2010 00:39:23 +0000 (00:39 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 26 Jun 2010 00:39:23 +0000 (00:39 +0000)
commit4f5d84e4adfe2fd972e20e1e9104fbacf8d63512
treee2bce266bf4d12dfaef3c2bd08f130d2d8927a33
parent80d9bc0336821ca2a94a7afe2daac6e8bc689ef7
When creating X86 MUL8 and DIV8 instructions, make sure we don't produce
CopyFromReg nodes for aliasing registers (AX and AL). This confuses the fast
register allocator.

Instead of CopyFromReg(AL), use ExtractSubReg(CopyFromReg(AX), sub_8bit).

This fixes PR7312.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106934 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/crash-O0.ll [new file with mode: 0644]