mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
30264d4391
As part of the unification of the debug format and the MIR format, print MBB references as '%bb.5'. The MIR printer prints the IR name of a MBB only for block definitions. * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g' * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g' * find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g' * grep -nr 'BB#' and fix Differential Revision: https://reviews.llvm.org/D40422 llvm-svn: 319665
67 lines
2.0 KiB
LLVM
67 lines
2.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx | FileCheck %s
|
|
|
|
; Check that we generate vector conversion from float to narrower int types
|
|
|
|
%f32vec_t = type <8 x float>
|
|
%i16vec_t = type <8 x i16>
|
|
%i8vec_t = type <8 x i8>
|
|
|
|
define void @fptoui16(%f32vec_t %a, %i16vec_t *%p) {
|
|
; CHECK-LABEL: fptoui16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vcvttps2dq %ymm0, %ymm0
|
|
; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
|
; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
|
|
; CHECK-NEXT: vmovdqa %xmm0, (%rdi)
|
|
; CHECK-NEXT: vzeroupper
|
|
; CHECK-NEXT: retq
|
|
%b = fptoui %f32vec_t %a to %i16vec_t
|
|
store %i16vec_t %b, %i16vec_t * %p
|
|
ret void
|
|
}
|
|
|
|
define void @fptosi16(%f32vec_t %a, %i16vec_t *%p) {
|
|
; CHECK-LABEL: fptosi16:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vcvttps2dq %ymm0, %ymm0
|
|
; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
|
; CHECK-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
|
|
; CHECK-NEXT: vmovdqa %xmm0, (%rdi)
|
|
; CHECK-NEXT: vzeroupper
|
|
; CHECK-NEXT: retq
|
|
%b = fptosi %f32vec_t %a to %i16vec_t
|
|
store %i16vec_t %b, %i16vec_t * %p
|
|
ret void
|
|
}
|
|
|
|
define void @fptoui8(%f32vec_t %a, %i8vec_t *%p) {
|
|
; CHECK-LABEL: fptoui8:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vcvttps2dq %ymm0, %ymm0
|
|
; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
|
; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
|
|
; CHECK-NEXT: vpackuswb %xmm0, %xmm0, %xmm0
|
|
; CHECK-NEXT: vmovq %xmm0, (%rdi)
|
|
; CHECK-NEXT: vzeroupper
|
|
; CHECK-NEXT: retq
|
|
%b = fptoui %f32vec_t %a to %i8vec_t
|
|
store %i8vec_t %b, %i8vec_t * %p
|
|
ret void
|
|
}
|
|
|
|
define void @fptosi8(%f32vec_t %a, %i8vec_t *%p) {
|
|
; CHECK-LABEL: fptosi8:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: vcvttps2dq %ymm0, %ymm0
|
|
; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
|
; CHECK-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
|
|
; CHECK-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
|
|
; CHECK-NEXT: vmovq %xmm0, (%rdi)
|
|
; CHECK-NEXT: vzeroupper
|
|
; CHECK-NEXT: retq
|
|
%b = fptosi %f32vec_t %a to %i8vec_t
|
|
store %i8vec_t %b, %i8vec_t * %p
|
|
ret void
|
|
}
|