[X86][AVX] Push sign extensions of comparison bool results through bitops (PR42025)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 5 Oct 2019 20:49:34 +0000 (20:49 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 5 Oct 2019 20:49:34 +0000 (20:49 +0000)
commit8815be04ec1f333564591d9593735f22efa9bee5
treeeabfdbf68322d13676527d02983c7c3eb6fbff89
parente2321bb4488a81b87742f3343e3bdf8e161aa35b
[X86][AVX] Push sign extensions of comparison bool results through bitops (PR42025)

As discussed on PR42025, with more complex boolean math we can end up with many truncations/extensions of the comparison results through each bitop.

This patch handles the cases introduced in combineBitcastvxi1 by pushing the sign extension through the AND/OR/XOR ops so its just the original SETCC ops that gets extended.

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

llvm-svn: 373834
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bitcast-and-setcc-256.ll
llvm/test/CodeGen/X86/bitcast-and-setcc-512.ll