[X86] Match the IR pattern form movmsk on SSE1 only targets where v4i32 isn't legal
authorCraig Topper <craig.topper@intel.com>
Sat, 10 Aug 2019 07:51:13 +0000 (07:51 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 10 Aug 2019 07:51:13 +0000 (07:51 +0000)
commit74c43a2277f6327a65d4b237473ac7be4f0585dd
tree4e58769b28d0ce522b2079c9f2a996d26c3941f9
parenta8e5e7371173cd13813bdefef537d502c0ecbe58
[X86] Match the IR pattern form movmsk on SSE1 only targets where v4i32 isn't legal

Summary:
This patch adds a special DAG combine for SSE1 to recognize the IR pattern InstCombine gives us for movmsk. This only does the recognition for a few cases where its obvious the input won't be scalarized resulting in building a vector just do to the movmsk. I've made it separate from our existing matching for movmsk since that's called in multiple places and I didn't spend time to see if the other callers would make sense here. Plus the restrictions and additional checks would complicate that.

This fixes the case from PR42870. Buts its probably still broken the presence of logic ops feeding the movmsk pattern which would further hide the v4f32 type.

Reviewers: spatel, RKSimon, xbolva00

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 368506
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pr42870.ll [new file with mode: 0644]