[x86] reduce 64-bit mask constant to 32-bits by right shifting
authorSanjay Patel <spatel@rotateright.com>
Sat, 23 Sep 2017 14:32:07 +0000 (14:32 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 23 Sep 2017 14:32:07 +0000 (14:32 +0000)
commitfa8bad8a0f85dbf5abf0cc8f404fec13d5b1e0fa
tree8a7a311407c6416fac72bdaf67cd0135c50e1863
parent5ca9f7a0cb90a9b5a8e03a6ec5a8e9585d175bf4
[x86] reduce 64-bit mask constant to 32-bits by right shifting

This is a follow-up from D38181 (r314023). We have to put 64-bit
constants into a register using a separate instruction, so we
should try harder to avoid that.

From what I see, we're not likely to encounter this pattern in the
DAG because the upstream setcc combines from this don't (usually?)
produce this pattern. If we fix that, then this will become more
relevant. Since the cost of handling this case is just loosening
the predicate of the existing fold, we might as well do it now.

llvm-svn: 314064
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/shift-and.ll