diff options
| author | Michael Kuperstein <mkuper@google.com> | 2016-11-23 18:33:49 +0000 |
|---|---|---|
| committer | Michael Kuperstein <mkuper@google.com> | 2016-11-23 18:33:49 +0000 |
| commit | 47eb85a0033fd21764fe100e736c3ec54d4f741f (patch) | |
| tree | 87b3a0867fc7cfd6773183ffa1082de972f1bbc8 /llvm/lib/Target/X86/X86InstrInfo.h | |
| parent | 3c3fe5d885b8772634a7571907400580873ab611 (diff) | |
| download | bcm5719-llvm-47eb85a0033fd21764fe100e736c3ec54d4f741f.tar.gz bcm5719-llvm-47eb85a0033fd21764fe100e736c3ec54d4f741f.zip | |
[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
llvm-svn: 287792
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.h')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index bc43820a024..a0292bbdaed 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -378,6 +378,10 @@ public: bool expandPostRAPseudo(MachineInstr &MI) const override; + /// Check whether the target can fold a load that feeds a subreg operand + /// (or a subreg operand that feeds a store). + bool isSubregFoldable() const override { return true; } + /// foldMemoryOperand - If this target supports it, fold a load or store of /// the specified stack slot into the specified machine instruction for the /// specified operand(s). If this is possible, the target should perform the |

