mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
0eb8d477e2
Summary: Fast selection of llvm fptoi & fptrunc instructions is not handled well about VSX instruction support. We'd use VSX float convert integer instruction instead of non-vsx float convert integer instruction if the operand register class is VSSRC or VSFRC because i32 and i64 are mapped to VSSRC and VSFRC correspondingly if VSX feature is openeded. For float trunc instruction, we do this silimar work like float convert integer instruction to try to use VSX instruction. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D58430 llvm-svn: 354762
14 lines
394 B
LLVM
14 lines
394 B
LLVM
; RUN: llc -mcpu=generic -mtriple=powerpc64le-unknown-unknown -O0 < %s \
|
|
; RUN: -verify-machineinstrs | FileCheck %s --check-prefix=GENERIC
|
|
; RUN: llc -mcpu=ppc -mtriple=powerpc64le-unknown-unknown -O0 < %s \
|
|
; RUN: -verify-machineinstrs | FileCheck %s
|
|
|
|
define float @testRSP(double %x) {
|
|
entry:
|
|
%0 = fptrunc double %x to float
|
|
ret float %0
|
|
; CHECK: frsp 1, 1
|
|
; GENERIC: xsrsp 1, 1
|
|
}
|
|
|