[X86] Teach X86InstrInfo::commuteInstructionImpl to use MOVSD/MOVSS for BLEND under...
authorCraig Topper <craig.topper@intel.com>
Tue, 10 Jul 2018 22:02:23 +0000 (22:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 10 Jul 2018 22:02:23 +0000 (22:02 +0000)
commit860ab496d32406f19010e9876a6c8b25d466ea10
tree57f26f613e628da597997d07fc91a0a95783153f
parenta929fd7f25a26b52a003f86bc8b34a4b76136ee3
[X86] Teach X86InstrInfo::commuteInstructionImpl to use MOVSD/MOVSS for BLEND under optsize when the immediate allows it.

Isel currently emits movss/movsd a lot of the time and an accidental double commute turns it into a blend.

Ideally we'd select blend directly in isel under optspeed and not rely on the double commute to create blend.

llvm-svn: 336731
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll
llvm/test/CodeGen/X86/sse41.ll