summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-12-10 10:16:13 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-12-10 10:16:13 +0000
commit5d0233bea22a103b5ecb5a9b5453f1206f2defe0 (patch)
tree49aa4e50293a75d02c4ae233141126d8101efdcd /llvm/test/CodeGen
parent85588fa2b0cd2a41a7c6ce58f989706bd470d04c (diff)
downloadbcm5719-llvm-5d0233bea22a103b5ecb5a9b5453f1206f2defe0.tar.gz
bcm5719-llvm-5d0233bea22a103b5ecb5a9b5453f1206f2defe0.zip
[AVR] Support stores to undefined pointers
This would previously trigger an assertion error in AVRISelDAGToDAG. llvm-svn: 289321
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/AVR/store-undef.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AVR/store-undef.ll b/llvm/test/CodeGen/AVR/store-undef.ll
new file mode 100644
index 00000000000..58ea50040a7
--- /dev/null
+++ b/llvm/test/CodeGen/AVR/store-undef.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -mattr=avr6 | FileCheck %s
+
+; This test checks that we can successfully lower a store
+; to an undefined pointer.
+
+; CHECK-LABEL: foo
+define void @foo() {
+
+ ; CHECK: ldi [[SRC:r[0-9]+]], 0
+ ; CHECK-NEXT: st [[PTRREG:X|Y|Z]], [[SRC]]
+ store i8 0, i8* undef, align 4
+ ret void
+}
OpenPOWER on IntegriCloud