Commit 6b067c6a authored by David Green's avatar David Green
Browse files

[ARM] Update ifcvt test target triples and opcodes. NFC

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.
parent 7ead0087
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# 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:             |
+1 −1
Original line number Diff line number Diff line
# 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:             |
+6 −6
Original line number Diff line number Diff line
# 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
@@ -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
+11 −11
Original line number Diff line number Diff line
# 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
@@ -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
+4 −4
Original line number Diff line number Diff line
# 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
@@ -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:
Loading