[DAGCombine][X86][AArch64] Masked merge unfolding: vector edition.
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 21 May 2018 21:41:02 +0000 (21:41 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 21 May 2018 21:41:02 +0000 (21:41 +0000)
commit7772de25d07c977e41f8faa3bbf327033cd81c20
tree7b728f8308187d0334a44d96cff110090adba71e
parentfd79bc3aa25fa19eafa6871c7a0a40dd680b4775
[DAGCombine][X86][AArch64] Masked merge unfolding: vector edition.

Summary:
This **appears** to be the last missing piece for the masked merge pattern handling in the backend.

This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]].

[[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly.
Previously, `andps`+`andnps` / `bsl` would be generated. (see `@out`)
Now, they would no longer be generated  (see `@in`), and we need to make sure that they are generated.

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

llvm-svn: 332904
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/AArch64/unfold-masked-merge-vector-variablemask-const.ll
llvm/test/CodeGen/AArch64/unfold-masked-merge-vector-variablemask.ll
llvm/test/CodeGen/X86/machine-cp.ll
llvm/test/CodeGen/X86/unfold-masked-merge-vector-variablemask-const.ll
llvm/test/CodeGen/X86/unfold-masked-merge-vector-variablemask.ll