[X86][SSE] Canonicalize scalar fp arithmetic shuffle patterns
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 18 Jul 2018 19:55:19 +0000 (19:55 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 18 Jul 2018 19:55:19 +0000 (19:55 +0000)
commitd4b82da1136ff60df4ba9da99aa260a2d7f02de1
tree04207f8d337b8ada3834c2ac27cc1d6d35d4c41b
parent4915d3a1ec3e7d3542aafd05487f7e8246460f4a
[X86][SSE] Canonicalize scalar fp arithmetic shuffle patterns

As discussed on PR38197, this canonicalizes MOVS*(N0, OP(N0, N1)) --> MOVS*(N0, SCALAR_TO_VECTOR(OP(N0[0], N1[0])))

This returns the scalar-fp codegen lost by rL336971.

Additionally it handles the OP(N1, N0)) case for commutable (FADD/FMUL) ops.

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

llvm-svn: 337419
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/sse-scalar-fp-arith.ll