HomePhabricator

[PowerPC] Add codegen for VSX word extract convert to FP

Description

[PowerPC] Add codegen for VSX word extract convert to FP

Add codegen for VSX word extract conversion from signed/unsigned to single/double
precision.

For UINT_TO_FP:
Extract word unsigned and convert to float was implemented in https://reviews.llvm.org/D20239.
Here we will add the missing extract integer and conversion to double. This
utilizes the new P9 instruction xxextractuw to extracting an integer element
when the result will be converted to double thereby saving 2 direct moves
(VSR <-> GPR).

For SINT_TO_FP:
We will implement the following sequence which will also reduce the number of
instructions by saving 2 direct moves.

v4i32->f32:

xxspltw
xvcvsxwsp
xscvspdpn

v4i32->f64:

xxspltw
xvcvsxwdp

Differential Revision: https://reviews.llvm.org/D35859

Details

Committed
leiAug 14 2017, 11:09 AM
Differential Revision
D35859: [PowerPC] Add codegen for VSX word extract convert to FP
Parents
rL310865: [OPENMP] Fix for PR33922: New ident_t flags for
Branches
Unknown
Tags
Unknown