summaryrefslogtreecommitdiff
path: root/test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir')
-rw-r--r--test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir b/test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir
new file mode 100644
index 0000000000000..3e7fdcd400d21
--- /dev/null
+++ b/test/CodeGen/AVR/pseudo/LDWRdPtr-same-src-dst.mir
@@ -0,0 +1,29 @@
+# RUN: llc -O0 %s -o - | FileCheck %s
+
+# This test checks the expansion of the 16-bit LDWRdPtr pseudo instruction.
+
+--- |
+ target triple = "avr--"
+ define void @test_ldwrdptr() {
+ entry:
+ ret void
+ }
+...
+
+---
+name: test_ldwrdptr
+tracksRegLiveness: true
+body: |
+ bb.0.entry:
+
+ ; CHECK-LABEL: test_ldwrdptr
+
+ ; CHECK: ld [[SCRATCH:r[0-9]+]], Z
+ ; CHECK-NEXT: push [[SCRATCH]]
+ ; CHECK-NEXT: ldd [[SCRATCH]], Z+1
+ ; CHECK-NEXT: mov r31, [[SCRATCH]]
+ ; CHECK-NEXT: pop r30
+
+ early-clobber %r31r30 = LDWRdPtr undef %r31r30
+...
+