Files
swift-mirror/test/Interpreter/simd.swift
Arnold Schwaighofer b38cacb3e9 IRGen: Use LLVM's alloc size to compute padding between types (#10464)
* IRGen: Use LLVM's alloc size to compute padding between types

We need to subtract alignment padding when doing type layout in terms of llvm types

rdar://32618125
SR-5137
2017-06-22 10:28:35 -07:00

32 lines
521 B
Swift

// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: OS=macosx
import simd
public struct Vector3f {
var f3: float3
init() {
f3 = float3(0, 1, 2)
}
}
public struct TwoFloat {
var f0 : Float
var f1 : Float
init() {
f0 = 0.0
f1 = 1.0
}
}
public func test() -> (Vector3f, TwoFloat) {
let v = Vector3f()
let y = TwoFloat()
let r = (v, y)
return r
}
// CHECK: (main.Vector3f(f3: float3(0.0, 1.0, 2.0)), main.TwoFloat(f0: 0.0, f1: 1.0))
print(test())