Files
kotlin-fork/kotlin-native/backend.native/tests/filecheck/kt53261/kt53261_noinline_UIntArray.kt
T
Alexander Shabalin c637a228eb [K/N] Fix filecheck kt53621 tests on linux arm64.
For aarch64-unknown-linux-gnu clang generates i1 to represent bool.
On our other targets it generates as zeroext i1 instead.
2023-09-13 16:55:09 +00:00

14 lines
595 B
Kotlin

/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// CHECK-LABEL: define {{zeroext i1|i1}} @"kfun:kotlin.UIntArray#equals(kotlin.Any?){}kotlin.Boolean"(%struct.ObjHeader* %0, %struct.ObjHeader* %1)
// CHECK: call %struct.ObjHeader* @"kfun:kotlin#<UIntArray-unbox>(kotlin.Any?){}kotlin.UIntArray?"
fun main() {
val arr1 = UIntArray(10) { it.toUInt() }
val arr2 = UIntArray(10) { (it / 2).toUInt() }
println(arr1 == arr2)
}