OSDN Git Service

[PowerPC] custom lower `v2f64 fpext v2f32`
authorLei Huang <lei@ca.ibm.com>
Fri, 10 May 2019 14:04:06 +0000 (14:04 +0000)
committerLei Huang <lei@ca.ibm.com>
Fri, 10 May 2019 14:04:06 +0000 (14:04 +0000)
commit5238a36901c0338172e69b98511f4e19671373b4
tree2054a7e028dbc9fb93e3fa9afb445f62f9db4a87
parent46a873680c0ee64c3f125d0da8856e227d76b99f
[PowerPC] custom lower `v2f64 fpext v2f32`

Reduces scalarization overhead via custom lowering of v2f64 fpext v2f32.

eg. For the following IR
  %0 = load <2 x float>, <2 x float>* %Ptr, align 8
  %1 = fpext <2 x float> %0 to <2 x double>
  ret <2 x double> %1

Pre custom lowering:
  ld r3, 0(r3)
  mtvsrd f0, r3
  xxswapd vs34, vs0
  xscvspdpn f0, vs0
  xxsldwi vs1, vs34, vs34, 3
  xscvspdpn f1, vs1
  xxmrghd vs34, vs0, vs1

After custom lowering:
  lfd f0, 0(r3)
  xxmrghw vs0, vs0, vs0
  xvcvspdp vs34, vs0

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360429 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrVSX.td
test/CodeGen/PowerPC/reduce_scalarization.ll [new file with mode: 0644]