• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -O0  %s -o - -march=avr | FileCheck %s
2
3# This test checks the expansion of the 16-bit 'LDDWRdPtrQ' pseudo instruction.
4#
5# This test ensures that the pseudo expander can correctly handle the case
6# where we are expanding a 16-bit LDD instruction where the source and
7# destination registers are the same.
8#
9# The instruction itself is earlyclobber and so ISel will never produce an
10# instruction like this, but the stack slot loading can and will.
11
12--- |
13  target triple = "avr--"
14  define void @test_lddwrdptrq() {
15  entry:
16    ret void
17  }
18...
19
20---
21name:            test_lddwrdptrq
22tracksRegLiveness: true
23body: |
24  bb.0.entry:
25
26    ; CHECK-LABEL: test_lddwrdptrq
27
28    ; CHECK:      ldd [[SCRATCH:r[0-9]+]], Z+10
29    ; CHECK-NEXT: push [[SCRATCH]]
30    ; CHECK-NEXT: ldd [[SCRATCH]], Z+11
31    ; CHECK-NEXT: mov r31, [[SCRATCH]]
32    ; CHECK-NEXT: pop r30
33
34    early-clobber $r31r30 = LDDWRdPtrQ undef $r31r30, 10
35...
36