48 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -global-isel | FileCheck %s --check-prefixes=SSE23; RUN: llc < %s -mtriple=x86_64-unknown-unknown -global-isel -mattr=+avx | FileCheck %s --check-prefixes=AVX4; RUN: llc < %s -mtriple=x86_64-unknown-unknown -global-isel -mattr=+avx512f | FileCheck %s --check-prefixes=AVX5125 6define half @test_i16_to_half(i16 %0) {7; SSE2-LABEL: test_i16_to_half:8; SSE2: # %bb.0: # %entry9; SSE2-NEXT: movd %edi, %xmm010; SSE2-NEXT: retq11;12; AVX-LABEL: test_i16_to_half:13; AVX: # %bb.0: # %entry14; AVX-NEXT: vmovd %edi, %xmm015; AVX-NEXT: retq16;17; AVX512-LABEL: test_i16_to_half:18; AVX512: # %bb.0: # %entry19; AVX512-NEXT: vmovd %edi, %xmm020; AVX512-NEXT: retq21entry:22 %2 = bitcast i16 %0 to half23 ret half %224}25 26define i16 @test_half_to_i16(half %0) {27; SSE2-LABEL: test_half_to_i16:28; SSE2: # %bb.0: # %entry29; SSE2-NEXT: movd %xmm0, %eax30; SSE2-NEXT: # kill: def $eax killed $eax def $ax31; SSE2-NEXT: retq32;33; AVX-LABEL: test_half_to_i16:34; AVX: # %bb.0: # %entry35; AVX-NEXT: vmovd %xmm0, %eax36; AVX-NEXT: # kill: def $eax killed $eax def $ax37; AVX-NEXT: retq38;39; AVX512-LABEL: test_half_to_i16:40; AVX512: # %bb.0: # %entry41; AVX512-NEXT: vmovd %xmm0, %eax42; AVX512-NEXT: # kill: def $eax killed $eax def $ax43; AVX512-NEXT: retq44entry:45 %2 = bitcast half %0 to i1646 ret i16 %247}48