[llvm] r289030 - [AVR] Add an assertion to ensure we don't emit LPM when it's unsupported
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 00:34:18 PST 2016
Author: dylanmckay
Date: Thu Dec 8 02:34:13 2016
New Revision: 289030
URL: http://llvm.org/viewvc/llvm-project?rev=289030&view=rev
Log:
[AVR] Add an assertion to ensure we don't emit LPM when it's unsupported
Modified:
llvm/trunk/lib/Target/AVR/AVRISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/AVR/AVRISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRISelDAGToDAG.cpp?rev=289030&r1=289029&r2=289030&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/AVRISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/AVR/AVRISelDAGToDAG.cpp Thu Dec 8 02:34:13 2016
@@ -366,6 +366,8 @@ template <> bool AVRDAGToDAGISel::select
return selectIndexedLoad(N);
}
+ assert(Subtarget->hasLPM() && "cannot load from program memory on this mcu");
+
// This is a flash memory load, move the pointer into R31R30 and emit
// the lpm instruction.
MVT VT = LD->getMemoryVT().getSimpleVT();
More information about the llvm-commits
mailing list