diff options
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 18d71da4741..f98497f654b 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -2392,6 +2392,10 @@ MachineInstr* X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF, return 0; } + // Conservatively fail out for loads without a memoperand. + if (LoadMI->memoperands_empty()) + return 0; + // Determine the alignment of the load. unsigned Alignment = 0; if (LoadMI->hasOneMemOperand()) |