llvm/test/CodeGen/PowerPC/pr27078.ll
Nemanja Ivanovic 990ef3411f [PowerPC] Generate VSX version of splat word
This patch corresponds to review:
http://reviews.llvm.org/D18592

It allows the PPC back end to generate the xxspltw instruction where we
previously only emitted vspltw.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-04 16:04:02 +00:00

16 lines
525 B
LLVM

; RUN: llc -mtriple=powerpc64-linux-gnu -mcpu=pwr8 -mattr=+vsx < %s | FileCheck %s
define <4 x float> @bar(float* %p, float* %q) {
%1 = bitcast float* %p to <12 x float>*
%2 = bitcast float* %q to <12 x float>*
%3 = load <12 x float>, <12 x float>* %1, align 16
%4 = load <12 x float>, <12 x float>* %2, align 16
%5 = fsub <12 x float> %4, %3
%6 = shufflevector <12 x float> %5, <12 x float> undef, <4 x i32> <i32 0, i32 3, i32 6, i32 9>
ret <4 x float> %6
; CHECK: xxspltw
; CHECK: vmrghw
; CHECK: vsldoi
}