forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AVR] Add tests for a large number of pseudo instructions
This adds MIR tests for 24 pseudo instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289191 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Dylan McKay
committed
Dec 9, 2016
1 parent
b2d19fd
commit 153fa86
Showing
28 changed files
with
572 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
; CHECK: %r15 = ASRRd %r15, implicit-def %sreg | ||
; CHECK-NEXT: %r14 = RORRd %r14, implicit-def %sreg, implicit killed %sreg | ||
%r15r14 = ASRWRd %r15r14, implicit-def %sreg | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
# TODO: Write this test. | ||
# This instruction isn't expanded by the pseudo expansion passs, but | ||
# rather AVRRegisterInfo::eliminateFrameIndex. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
registers: | ||
- { id: 0, class: _ } | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
%r29r28 = FRMIDX %r31r30, 0, implicit-def %sreg | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
; CHECK: %r14 = INRdA 31 | ||
; CHECK-NEXT: %r15 = INRdA 32 | ||
%r15r14 = INWRdA 31 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
# This test checks the expansion of the 16-bit LDIWRdK pseudo instruction. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test_ldiwrdrr() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test_ldiwrdrr | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test_ldiwrdrr | ||
; CHECK: %r30 = LDIRdK 255 | ||
; CHECK-NEXT: %r31 = LDIRdK 9 | ||
%r31r30 = LDIWRdK 2559 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
# This test checks the expansion of the 16-bit LDSWRdK pseudo instruction. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test_ldswrdrr() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test_ldswrdrr | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test_ldswrdrr | ||
; CHECK: %r30 = LDSRdK 2559 | ||
; CHECK-NEXT: %r31 = LDSRdK 2560 | ||
%r31r30 = LDSWRdK 2559 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | 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 | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test_ldwrdptr | ||
; CHECK: %r0 = LDRdPtr %r31r30 | ||
; CHECK-NEXT: early-clobber %r1 = LDDRdPtrQ %r31r30, 1 | ||
%r1r0 = LDWRdPtr %r31r30 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
# This test checks the expansion of the 16-bit LDWRdPtrPd pseudo instruction. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test_ldwrdptrpd() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test_ldwrdptrpd | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test_ldwrdptrpd | ||
; CHECK: early-clobber %r1, early-clobber %r31r30 = LDRdPtrPd killed %r31r30 | ||
; CHECK-NEXT: early-clobber %r0, early-clobber %r31r30 = LDRdPtrPd killed %r31r30 | ||
%r1r0, %r31r30 = LDWRdPtrPd %r31r30 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
# This test checks the expansion of the 16-bit LDWRdPtrPi pseudo instruction. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test_ldwrdptrpi() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test_ldwrdptrpi | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test_ldwrdptrpi | ||
; CHECK: early-clobber %r0, early-clobber %r31r30 = LDRdPtrPi killed %r31r30 | ||
; CHECK-NEXT: early-clobber %r1, early-clobber %r31r30 = LDRdPtrPi killed %r31r30 | ||
%r1r0, %r31r30 = LDWRdPtrPi %r31r30 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
# XFAIL: * | ||
|
||
# This instruction is currently unimplemented. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
%r5r4 = LPMWRdZ %r31r30 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
# XFAIL: * | ||
|
||
# This instruction is currently unimplemented. | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
%r5r4 = LPMWRdZPi %r31r30, implicit-def %r31r30 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
; CHECK: %r14 = LSLRd %r14, implicit-def %sreg | ||
; CHECK-NEXT: %r15 = ROLRd %r15, implicit-def %sreg, implicit killed %sreg | ||
%r15r14 = LSLWRd %r15r14, implicit-def %sreg | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
; CHECK: %r15 = LSRRd %r15, implicit-def %sreg | ||
; CHECK-NEXT: %r14 = RORRd %r14, implicit-def %sreg, implicit killed %sreg | ||
%r15r14 = LSRWRd %r15r14, implicit-def %sreg | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - 2>&1 | FileCheck %s | ||
|
||
--- | | ||
target triple = "avr--" | ||
define void @test() { | ||
entry: | ||
ret void | ||
} | ||
... | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0.entry: | ||
; CHECK-LABEL: test | ||
; CHECK: OUTARr 32, %r15 | ||
; CHECK-NEXT: OUTARr 31, %r14 | ||
OUTWARr 31, %r15r14 | ||
... |
Oops, something went wrong.