Skip to content

Commit

Permalink
[ARM] Update ifcvt test target triples and opcodes. NFC
Browse files Browse the repository at this point in the history
Some of the instructions in these tests were technically invalid
combinations (using ARM opcodes in Thumb mode, for example). Update the
targets and the instructions used to be more correct.
  • Loading branch information
davemgreen committed Jan 2, 2020
1 parent 7ead008 commit 6b067c6
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 41 deletions.
@@ -1,4 +1,4 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=armv7-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
---
name: foo
body: |
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/ARM/ifcvt_canFallThroughTo.mir
@@ -1,4 +1,4 @@
# RUN: llc -mtriple=arm-apple-ios -o - %s -run-pass if-converter | FileCheck %s
# RUN: llc -mtriple=armv7-apple-ios -o - %s -run-pass if-converter | FileCheck %s
---
name: f1
body: |
Expand Down
12 changes: 6 additions & 6 deletions llvm/test/CodeGen/ARM/ifcvt_diamond_unanalyzable.mir
@@ -1,22 +1,22 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=thumbv7-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
---
name: foo
body: |
bb.0:
Bcc %bb.2, 1, $cpsr
tBcc %bb.2, 1, $cpsr
bb.1:
$sp = tADDspi $sp, 1, 14, _
B %bb.3
tB %bb.3, 14, $noreg
bb.2:
$sp = tADDspi $sp, 2, 14, _
B %bb.3
tB %bb.3, 14, $noreg
bb.3:
successors:
$sp = tADDspi $sp, 3, 14, _
BX_RET 14, _
tBX_RET 14, _
...

# Diamond testcase with unanalyzable instruction in the BB following the
Expand All @@ -27,4 +27,4 @@ body: |
# CHECK: $sp = tADDspi $sp, 2, 1, $cpsr
# CHECK: $sp = tADDspi $sp, 1, 0, $cpsr, implicit $sp
# CHECK: $sp = tADDspi $sp, 3, 14, $noreg
# CHECK: BX_RET 14, $noreg
# CHECK: tBX_RET 14, $noreg
22 changes: 11 additions & 11 deletions llvm/test/CodeGen/ARM/ifcvt_forked_diamond_unanalyzable.mir
@@ -1,31 +1,31 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=thumbv7-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
---
name: foo
body: |
bb.0:
Bcc %bb.2, 1, $cpsr
tBcc %bb.2, 1, $cpsr
bb.1:
successors: %bb.3(0x20000000), %bb.4(0x60000000)
$sp = tADDspi $sp, 1, 14, _
Bcc %bb.3, 1, $cpsr
B %bb.4
tBcc %bb.3, 1, $cpsr
tB %bb.4, 14, $noreg
bb.2:
successors: %bb.3(0x20000000), %bb.4(0x60000000)
$sp = tADDspi $sp, 2, 14, _
Bcc %bb.3, 1, $cpsr
B %bb.4
tBcc %bb.3, 1, $cpsr
tB %bb.4, 14, $noreg
bb.3:
successors:
$sp = tADDspi $sp, 3, 14, _
BX_RET 14, _
tBX_RET 14, _
bb.4:
successors:
$sp = tADDspi $sp, 4, 14, _
BX_RET 14, _
tBX_RET 14, _
...

# Forked-diamond testcase with unanalyzable instructions in both the True and
Expand All @@ -37,12 +37,12 @@ body: |

# CHECK: $sp = tADDspi $sp, 2, 1, $cpsr
# CHECK: $sp = tADDspi $sp, 1, 0, $cpsr, implicit $sp
# CHECK: Bcc %bb.2, 1, $cpsr
# CHECK: t2Bcc %bb.2, 1, $cpsr

# CHECK: bb.1:
# CHECK: $sp = tADDspi $sp, 4, 14, $noreg
# CHECK: BX_RET 14, $noreg
# CHECK: tBX_RET 14, $noreg

# CHECK: bb.2:
# CHECK: $sp = tADDspi $sp, 3, 14, $noreg
# CHECK: BX_RET 14, $noreg
# CHECK: tBX_RET 14, $noreg
8 changes: 4 additions & 4 deletions llvm/test/CodeGen/ARM/ifcvt_simple_bad_zero_prob_succ.mir
@@ -1,16 +1,16 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=thumbv7-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
---
name: f1
body: |
bb.0:
bb.1:
Bcc %bb.3, 0, $cpsr
tBcc %bb.3, 0, $cpsr
bb.2:
bb.3:
Bcc %bb.1, 0, $cpsr
tBcc %bb.1, 0, $cpsr
bb.4:
successors: %bb.1
Expand All @@ -28,6 +28,6 @@ body: |
# CHECK: successors: %bb.1(0x80000000)
# CHECK-NOT: %bb.2(0x00000000)
# CHECK: tBRIND $r1, 1, $cpsr
# CHECK: B %bb.1
# CHECK: t2B %bb.1

#CHECK-NOT: bb.2:
12 changes: 6 additions & 6 deletions llvm/test/CodeGen/ARM/ifcvt_simple_unanalyzable.mir
@@ -1,25 +1,25 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=thumbv7-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
---
name: foo
body: |
bb.0:
Bcc %bb.2, 0, $cpsr
tBcc %bb.2, 0, $cpsr
bb.1:
successors:
BX_RET 14, _
tBX_RET 14, _
bb.2:
successors:
$sp = tADDspi $sp, 2, 14, _
BX_RET 14, _
tBX_RET 14, _
...

# Simple testcase with unanalyzable instructions in both TBB and FBB.

# CHECK: body: |
# CHECK: bb.0:
# CHECK: $sp = tADDspi $sp, 2, 0, $cpsr
# CHECK: BX_RET 0, $cpsr
# CHECK: BX_RET 14, $noreg
# CHECK: tBX_RET 0, $cpsr
# CHECK: tBX_RET 14, $noreg

14 changes: 7 additions & 7 deletions llvm/test/CodeGen/ARM/ifcvt_triangleSameCvtNext.mir
@@ -1,22 +1,22 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter -verify-machineinstrs %s -o - | FileCheck %s
# RUN: llc -mtriple=thumbv7-apple-ios -run-pass=if-converter -verify-machineinstrs %s -o - | FileCheck %s
...
---
name: foo
body: |
bb.0:
Bcc %bb.2, 1, $cpsr
tBcc %bb.2, 1, $cpsr
bb.1:
$sp = tADDspi $sp, 2, 14, _
B %bb.1
tB %bb.1, 14, $noreg
bb.2:
Bcc %bb.3, 0, $cpsr
B %bb.2
tBcc %bb.3, 0, $cpsr
tB %bb.2, 14, $noreg
bb.3:
Bcc %bb.1, 1, $cpsr
B %bb.1
tBcc %bb.1, 1, $cpsr
tB %bb.1, 14, $noreg
...

# Both branches in bb.3 jump to bb.1. IfConversion shouldn't treat this as a
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/CodeGen/ARM/ifcvt_triangleWoCvtToNextEdge.mir
@@ -1,4 +1,4 @@
# RUN: llc -mtriple=arm-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
# RUN: llc -mtriple=thumb-apple-ios -run-pass=if-converter %s -o - | FileCheck %s
--- |
declare void @__stack_chk_fail()
declare void @bar()
Expand All @@ -12,11 +12,11 @@ name: foo
body: |
bb.0:
Bcc %bb.1, 1, $cpsr
B %bb.2
tBcc %bb.1, 1, $cpsr
tB %bb.2, 14, $noreg
bb.1:
Bcc %bb.3, 0, $cpsr
tBcc %bb.3, 0, $cpsr
bb.2:
successors:
Expand All @@ -38,7 +38,7 @@ body: |

# CHECK: bb.0:
# CHECK: successors: %bb.2(0x40000000), %bb.1(0x40000000)
# CHECK: Bcc %bb.2, 1, $cpsr
# CHECK: tBcc %bb.2, 1, $cpsr

# CHECK: bb.1:
# CHECK-NOT: successors: %bb
Expand Down

0 comments on commit 6b067c6

Please sign in to comment.