[Target][ARM] Fold or(A, B) more aggressively for I1 vectors
authorPierre-vh <pierre.vanhoutryve@arm.com>
Fri, 1 May 2020 13:57:36 +0000 (14:57 +0100)
committerPierre-vh <pierre.vanhoutryve@arm.com>
Tue, 5 May 2020 09:03:02 +0000 (10:03 +0100)
commitd5eb7ffa3372e33eb0a598b451236fbdddcbcc4a
treec62378dd8c2dda39f820b361507c735c19327192
parentffdda495f79a3147c4b351b323235ec429cc4f7d
[Target][ARM] Fold or(A, B) more aggressively for I1 vectors

This patch makes the folding of or(A, B) into not(and(not(A), not(B)))
more agressive for I1 vector. This only affects Thumb2 MVE and improves
codegen, because it removes a lot of msr/mrs instructions on VPR.P0.

This patch also adds a xor(vcmp) -> !vcmp fold for MVE.

Differential Revision: https://reviews.llvm.org/D77202
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll
llvm/test/CodeGen/Thumb2/mve-pred-or.ll
llvm/test/CodeGen/Thumb2/mve-vcmpf.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfz.ll