[PowerPC] Improve codegen for int-to-fp conversion of subword vector extract
authorAlbion Fung <albion.fung@ibm.com>
Tue, 11 May 2021 19:56:24 +0000 (14:56 -0500)
committerAlbion Fung <albionapc@gmail.com>
Tue, 11 May 2021 20:00:11 +0000 (15:00 -0500)
commitffbffaf6b6b0fc06abb7b43ec8de8bc61d941bc7
tree637236bb9819e15283cb54c39ea01148761280cb
parent69069509b2d3cb0e0bcf6e38e0ab05c432adc763
[PowerPC] Improve codegen for int-to-fp conversion of subword vector extract

When an integer is converted into floating point in subword vector extract,
it can be done in 2 instructions instead of the 3+ instructions it generates
right now. This patch removes the uncessary generation.

Differential: https://reviews.llvm.org/D100604
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll
llvm/test/CodeGen/PowerPC/vec-extract-itofp.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/vec_conv_i16_to_fp32_elts.ll
llvm/test/CodeGen/PowerPC/vec_conv_i8_to_fp32_elts.ll