[X86][SSE] Add selective commutation support for insertps (PR40340)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Jan 2019 12:17:48 +0000 (12:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Jan 2019 12:17:48 +0000 (12:17 +0000)
commit180fcff5a7bca0b7bc2be14a21066f1eda3a7964
treee6e197e24a625b87a21f10404ffc84ce6e884c23
parentcd26560e46c2a2a50dbc79775b9a8bba03990945
[X86][SSE] Add selective commutation support for insertps (PR40340)

When we are inserting 1 "inline" element, and zeroing 2 of the other elements then we can safely commute the insertps source inputs to improve memory folding.

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

llvm-svn: 351807
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/X86/insertps-combine.ll