[TwoAddressInstructionPass] Improve tryInstructionCommute of X86 FMA and vpternlog...
authorCraig Topper <craig.topper@intel.com>
Fri, 9 Mar 2018 23:36:58 +0000 (23:36 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 9 Mar 2018 23:36:58 +0000 (23:36 +0000)
commitf6ff51fc62f312e0251c663c8d527559af1bf8ed
tree40df2c59382d4b59e2f59f547f5b4e490ef08cbb
parentc332ae8be81f3ae7c57d068e806d720d017d69ec
[TwoAddressInstructionPass] Improve tryInstructionCommute of X86 FMA and vpternlog instructions

These instructions have 3 operands that can be commuted. The first commute we find may not be the best. So we should keep searching if we performed an aggressive commute. There may still be an operand that is killed or a physical register constraint that might be better.

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

llvm-svn: 327188
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/test/CodeGen/X86/avx512-vpternlog-commute.ll