[X86] Try to avoid casts around logical vector ops recursively.
authorFlorian Hahn <flo@fhahn.com>
Mon, 20 Jan 2020 01:11:43 +0000 (17:11 -0800)
committerFlorian Hahn <flo@fhahn.com>
Mon, 20 Jan 2020 01:22:43 +0000 (17:22 -0800)
commit0ee1db2d1d7aab9e2736c664ebd27fa23919964e
tree31538f7e1f930e085f8c1e53a27dbd0e4602b9b2
parent886d2c2ca75f01b5a094c160aee911a04421dd56
[X86] Try to avoid casts around logical vector ops recursively.

Currently PromoteMaskArithemtic only looks at a single operation to
skip casts. This means we miss cases where we combine multiple masks.

This patch updates PromoteMaskArithemtic to try to recursively promote
AND/XOR/AND nodes that terminate in truncates of the right size or
constant vectors.

Reviewers: craig.topper, RKSimon, spatel

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D72524
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/v8i1-masks.ll