projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4879815
)
[AVR] Add an assertion to ensure we don't emit LPM when it's unsupported
author
Dylan McKay
<dylanmckay34@gmail.com>
Thu, 8 Dec 2016 08:34:13 +0000
(08:34 +0000)
committer
Dylan McKay
<dylanmckay34@gmail.com>
Thu, 8 Dec 2016 08:34:13 +0000
(08:34 +0000)
llvm-svn: 289030
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
b/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
index
d190a60
..
098ee61
100644
(file)
--- a/
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+++ b/
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
@@
-366,6
+366,8
@@
template <> bool AVRDAGToDAGISel::select<ISD::LOAD>(SDNode *N) {
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();