Skip to content

Commit

Permalink
Fix IRGen test case abi_v7k and turn it back on
Browse files Browse the repository at this point in the history
rdar://32317328
  • Loading branch information
aschwaighofer committed May 22, 2017
1 parent 8501af3 commit 8425ed7
Showing 1 changed file with 15 additions and 42 deletions.
57 changes: 15 additions & 42 deletions test/IRGen/abi_v7k.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

// REQUIRES: CPU=armv7k
// REQUIRES: OS=watchos
// REQUIRES: rdar_32317328

// CHECK-LABEL: define hidden swiftcc float @_T08test_v7k9addFloats{{.*}}(float, float)
// CHECK: fadd float %0, %1
Expand Down Expand Up @@ -204,12 +203,12 @@ func testMultiP(x: MultiPayload) -> Double {
// CHECK: ret float
// V7K-LABEL: __T08test_v7k0A3Opt
// V7K: tst r1, #1
// V7K: str r0, [r7, #-20]
// V7K: ldr r0, [r7, #-20]
// V7K: str r0, [r7, [[SLOT:#-[0-9]+]]
// V7K: ldr r0, [r7, [[SLOT]]
// V7K: vmov s0, r0
// V7K: sub sp, r7, #16
// V7K: pop {r11}
// V7K: pop {r4, r5, r6, r7, pc}
// V7K: vstr s0, [r7, [[SLOT2:#-[0-9]+]]
// V7K: vldr s0, [r7, [[SLOT2]]
// V7K: pop {{{.*}}, pc}
func testOpt(x: Float?) -> Float {
return x!
}
Expand Down Expand Up @@ -339,42 +338,16 @@ func minMax3(x : Int, y : Int) -> Ret? {
// Passing struct: Int8, MyPoint x 10, MySize * 10
// CHECK-LABEL: define hidden swiftcc double @_T08test_v7k0A4Ret5{{.*}}(%T8test_v7k7MyRect3V* noalias nocapture dereferenceable(328))
// V7K-LABEL: __T08test_v7k0A4Ret5
// V7K: sub sp, sp, #56
// V7K: ldrb r1, [r0]
// V7K: strb r1, [sp, #52]
// V7K: ldrsb r1, [sp, #52]
// V7K: vmov s0, r1
// V7K: vcvt.f64.s32 d16, s0
// V7K: ldr r1, [r0, #8]
// V7K: str r1, [sp, #24]
// V7K: ldr r1, [r0, #12]
// V7K: str r1, [sp, #28]
// V7K: ldr r1, [r0, #16]
// V7K: str r1, [sp, #32]
// V7K: ldr r1, [r0, #20]
// V7K: str r1, [sp, #36]
// V7K: ldr r1, [sp, #24]
// V7K: str r1, [sp, #40]
// V7K: ldr r1, [sp, #28]
// V7K: str r1, [sp, #44]
// V7K: vldr d18, [sp, #40]
// V7K: vadd.f64 d16, d16, d18
// V7K: ldr r1, [r0, #296]
// V7K: str r1, [sp]
// V7K: ldr r1, [r0, #300]
// V7K: str r1, [sp, #4]
// V7K: ldr r1, [r0, #304]
// V7K: str r1, [sp, #8]
// V7K: ldr r0, [r0, #308]
// V7K: str r0, [sp, #12]
// V7K: ldr r0, [sp]
// V7K: str r0, [sp, #16]
// V7K: ldr r0, [sp, #4]
// V7K: str r0, [sp, #20]
// V7K: vldr d18, [sp, #16]
// V7K: vadd.f64 d0, d16, d18
// V7K: add sp, sp, #56
// V7K: bx lr
// V7K: ldrb r1, [r0]
// V7K: vldr d16, [r0, #8]
// V7K: add r0, r0, #296
// V7K: vldr d18, [r0]
// V7K: sxtb r0, r1
// V7K: vmov s0, r0
// V7K: vcvt.f64.s32 d20, s0
// V7K: vadd.f64 d16, d20, d16
// V7K: vadd.f64 d0, d16, d18
// V7K: bx lr

struct MyRect3 {
var t: Int8
Expand Down

0 comments on commit 8425ed7

Please sign in to comment.