OSDN Git Service

[X86] Allow folding of stack reloads when loading a subreg of the spilled reg
authorMichael Kuperstein <mkuper@google.com>
Wed, 23 Nov 2016 18:33:49 +0000 (18:33 +0000)
committerMichael Kuperstein <mkuper@google.com>
Wed, 23 Nov 2016 18:33:49 +0000 (18:33 +0000)
commit4f54847874d8eeff4e4b63c6bf21f799a233d96e
treeb52aa816ab05a3e2a12d027c8e0ee314abcc2811
parentfe8bde7e921e131799b28d7d427381670322eaf4
[X86] Allow folding of stack reloads when loading a subreg of the spilled reg

We did not support subregs in InlineSpiller:foldMemoryOperand() because targets
may not deal with them correctly.

This adds a target hook to let the spiller know that a target can handle
subregs, and actually enables it for x86 for the case of stack slot reloads.
This fixes PR30832.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287792 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/InlineSpiller.cpp
lib/CodeGen/TargetInstrInfo.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
test/CodeGen/X86/partial-fold32.ll
test/CodeGen/X86/partial-fold64.ll
test/CodeGen/X86/vector-half-conversions.ll