[PowerPC] Fix strict load-conversion recognition
authorQiu Chaofan <qiucofan@cn.ibm.com>
Wed, 16 Nov 2022 01:59:39 +0000 (09:59 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Wed, 16 Nov 2022 02:02:10 +0000 (10:02 +0800)
commit5d19fea81fc2352100916e04e45adf5650b113f6
treec0dafcc2697650d257ecd773b11527a3b057049f
parente8e92c8313a0481ad2770587310d399abddce665
[PowerPC] Fix strict load-conversion recognition

Direct-move instructions are usually more efficient than load then store
for conversion. But direct moves are not needed when the source register
was just loaded from some address.

The pattern has already been recognized, but the source value of strict
nodes are not the first (that's the chain), but the second.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D138011
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/fp-strict-conv.ll