Skip to content

Remove an overly fragile test for armv7k #19646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions stdlib/public/core/FloatingPointTypes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -1595,13 +1595,13 @@ extension ${Self} {
// falling back on the generic _convert operation otherwise.
@_transparent
public init<Source : BinaryInteger>(_ value: Source) {
if value.bitWidth <= 64 {
if value.bitWidth <= ${word_bits} {
if Source.isSigned {
let asI64 = Int64(truncatingIfNeeded: value)
_value = Builtin.sitofp_Int64_FPIEEE${bits}(asI64._value)
let asInt = Int(truncatingIfNeeded: value)
_value = Builtin.sitofp_Int${word_bits}_FPIEEE${bits}(asInt._value)
} else {
let asU64 = Int64(truncatingIfNeeded: value)
_value = Builtin.uitofp_Int64_FPIEEE${bits}(asU64._value)
let asUInt = Int(truncatingIfNeeded: value)
_value = Builtin.uitofp_Int${word_bits}_FPIEEE${bits}(asUInt._value)
}
} else {
self = ${Self}._convert(from: value).value
Expand Down
66 changes: 0 additions & 66 deletions test/IRGen/abi_v7k.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,69 +337,3 @@ func minMax3(x : Int, y : Int) -> Ret? {
var r = Ret(min:currentMin, max:currentMax, min2:currentMin, max2:currentMax, min3:currentMin, max3:currentMax)
return r
}

// Passing struct: Int8, MyPoint x 10, MySize * 10
// CHECK-LABEL: define hidden swiftcc double @"$s8test_v7k0A4Ret5{{.*}}"(%T8test_v7k7MyRect3V* noalias nocapture dereferenceable(328))
// V7K-LABEL: _$s8test_v7k0A4Ret5
// V7K: ldrb r1, [r0]
// V7K: strb.w r1, [sp, #52]
// V7K: ldrsb.w 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.w r1, [r0, #296]
// V7K: str r1, [sp]
// V7K: ldr.w r1, [r0, #300]
// V7K: str r1, [sp, #4]
// V7K: ldr.w r1, [r0, #304]
// V7K: str r1, [sp, #8]
// V7K: ldr.w 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, #56
// V7K: bx lr

struct MyRect3 {
var t: Int8
var p: MyPoint
var p2: MyPoint
var s: MySize
var s2: MySize
var p3: MyPoint
var p4: MyPoint
var s3: MySize
var s4: MySize
var p5: MyPoint
var p6: MyPoint
var s5: MySize
var s6: MySize
var p7: MyPoint
var p8: MyPoint
var s7: MySize
var s8: MySize
var p9: MyPoint
var p10: MyPoint
var s9: MySize
var s10: MySize
}
func testRet5(r: MyRect3) -> Double {
return Double(r.t) + r.p.x + r.s9.w
}