; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: not --crash llc -mtriple=aarch64_be -mattr=+sve < %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning define @bitcast_i16_to_i8( %v) { ; CHECK-LABEL: bitcast_i16_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_i8( %v) { ; CHECK-LABEL: bitcast_i32_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_i8( %v) { ; CHECK-LABEL: bitcast_i64_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_i8( %v) { ; CHECK-LABEL: bitcast_half_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_i8( %v) { ; CHECK-LABEL: bitcast_float_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_i8( %v) { ; CHECK-LABEL: bitcast_double_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_i16( %v) { ; CHECK-LABEL: bitcast_i8_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_i16( %v) { ; CHECK-LABEL: bitcast_i32_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_i16( %v) { ; CHECK-LABEL: bitcast_i64_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_i16( %v) { ; CHECK-LABEL: bitcast_half_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_i16( %v) { ; CHECK-LABEL: bitcast_float_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_i16( %v) { ; CHECK-LABEL: bitcast_double_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_i32( %v) { ; CHECK-LABEL: bitcast_i8_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_i32( %v) { ; CHECK-LABEL: bitcast_i16_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_i32( %v) { ; CHECK-LABEL: bitcast_i64_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_i32( %v) { ; CHECK-LABEL: bitcast_half_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_i32( %v) { ; CHECK-LABEL: bitcast_float_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_i32( %v) { ; CHECK-LABEL: bitcast_double_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_i64( %v) { ; CHECK-LABEL: bitcast_i8_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_i64( %v) { ; CHECK-LABEL: bitcast_i16_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_i64( %v) { ; CHECK-LABEL: bitcast_i32_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_i64( %v) { ; CHECK-LABEL: bitcast_half_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_i64( %v) { ; CHECK-LABEL: bitcast_float_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_i64( %v) { ; CHECK-LABEL: bitcast_double_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_half( %v) { ; CHECK-LABEL: bitcast_i8_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_half( %v) { ; CHECK-LABEL: bitcast_i16_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_half( %v) { ; CHECK-LABEL: bitcast_i32_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_half( %v) { ; CHECK-LABEL: bitcast_i64_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_half( %v) { ; CHECK-LABEL: bitcast_float_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_half( %v) { ; CHECK-LABEL: bitcast_double_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_float( %v) { ; CHECK-LABEL: bitcast_i8_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_float( %v) { ; CHECK-LABEL: bitcast_i16_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_float( %v) { ; CHECK-LABEL: bitcast_i32_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_float( %v) { ; CHECK-LABEL: bitcast_i64_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_float( %v) { ; CHECK-LABEL: bitcast_half_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_float( %v) { ; CHECK-LABEL: bitcast_double_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_double( %v) { ; CHECK-LABEL: bitcast_i8_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_double( %v) { ; CHECK-LABEL: bitcast_i16_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_double( %v) { ; CHECK-LABEL: bitcast_i32_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_double( %v) { ; CHECK-LABEL: bitcast_i64_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_double( %v) { ; CHECK-LABEL: bitcast_half_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_double( %v) { ; CHECK-LABEL: bitcast_float_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_i8( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_i16( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_i32( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_i64( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_half( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_half: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_float( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_float: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_bfloat_to_double( %v) #0 { ; CHECK-LABEL: bitcast_bfloat_to_double: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i8_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_i8_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i16_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_i16_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i32_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_i32_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_i64_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_i64_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_half_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_half_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_float_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_float_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } define @bitcast_double_to_bfloat( %v) #0 { ; CHECK-LABEL: bitcast_double_to_bfloat: ; CHECK: // %bb.0: ; CHECK-NEXT: ret %bc = bitcast %v to ret %bc } ; +bf16 is required for the bfloat version. attributes #0 = { "target-features"="+sve,+bf16" }