mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
d15522bb98
Power8 has MTVSRWZ but no LXSIBZX/LXSIHZX, so move 1 or 2 bytes to VSR through MTVSRWZ is much faster than store the extended value into stack and load it with LXSIWZX. This patch fixes pr31144. Differential Revision: https://reviews.llvm.org/D27287 llvm-svn: 289473
27 lines
532 B
LLVM
27 lines
532 B
LLVM
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx < %s | FileCheck %s --implicit-check-not lxsiwzx
|
|
|
|
declare void @bar(double)
|
|
|
|
define void @foo1(i8* %p) {
|
|
entry:
|
|
%0 = load i8, i8* %p, align 1
|
|
%conv = uitofp i8 %0 to double
|
|
call void @bar(double %conv)
|
|
ret void
|
|
|
|
; CHECK-LABEL: @foo1
|
|
; CHECK: mtvsrwz
|
|
}
|
|
|
|
define void @foo2(i16* %p) {
|
|
entry:
|
|
%0 = load i16, i16* %p, align 2
|
|
%conv = uitofp i16 %0 to double
|
|
call void @bar(double %conv)
|
|
ret void
|
|
|
|
; CHECK-LABEL: @foo2
|
|
; CHECK: mtvsrwz
|
|
}
|
|
|