X86: Stop LEA64_32r doing unspeakable things to its arguments.
authorTim Northover <tnorthover@apple.com>
Mon, 10 Jun 2013 20:43:49 +0000 (20:43 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 10 Jun 2013 20:43:49 +0000 (20:43 +0000)
commite5609f37323b105c7720d5d423a9203d1e869c29
treeb833920ba791a63f5f903bc006254ac93541442e
parent6d315c6cf201a111d6e7c9118fafc6c39915d1db
X86: Stop LEA64_32r doing unspeakable things to its arguments.

Previously LEA64_32r went through virtually the entire backend thinking it was
using 32-bit registers until its blissful illusions were cruelly snatched away
by MCInstLower and 64-bit equivalents were substituted at the last minute.

This patch makes it behave normally, and take 64-bit registers as sources all
the way through. Previous uses (for 32-bit arithmetic) are accommodated via
SUBREG_TO_REG instructions which make the types and classes agree properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183693 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86MCInstLower.cpp
test/CodeGen/X86/MachineSink-CritEdge.ll
test/CodeGen/X86/lea.ll
test/CodeGen/X86/machine-cse.ll