[X86][SSE] MatchVectorAllZeroTest - handle OR vector reductions (REAPPLIED)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Jun 2020 14:24:49 +0000 (15:24 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 29 Jun 2020 14:50:44 +0000 (15:50 +0100)
commit333aa690f4cd16b5c96631c104d1e0d4cf8fe78b
tree7871789395a3046060e58a7c5662db9c10967398
parent57ad8f4730c982813c6f4672c45f4b73f0f0d79f
[X86][SSE] MatchVectorAllZeroTest - handle OR vector reductions (REAPPLIED)

This patch extends MatchVectorAllZeroTest to handle OR vector reduction patterns where the result is compared against zero.

Reapplied with a fix for a chromium regression due to a missing isNullConstant() check in combineSetCC: https://bugs.chromium.org/p/chromium/issues/detail?id=1097758

Fixes PR45378

Differential Revision: https://reviews.llvm.org/D81547
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pr45378.ll
llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll