[PATCH] [ARM] Fix vector ule zero lowering
authorDavid Green <david.green@arm.com>
Wed, 2 Nov 2022 22:34:05 +0000 (22:34 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Wed, 30 Nov 2022 14:31:52 +0000 (14:31 +0000)
commit15c33ffa295856715c13d6e1f18fae404a668df1
tree72b8d9cbbdfcc549a0e939348d8827eb96b3c3cb
parent738ec50e8a6e5b97c308cfecd6f52b1bfcb3f63b
[PATCH] [ARM] Fix vector ule zero lowering

The instruction icmp ule <4 x i32> %0, zeroinitializer will usually be
simplified to icmp eq <4 x i32> %0, zeroinitializer. It is not
guaranteed though, and the code for lowering vector compares could pick
the wrong form of the instruction if this happened. I've tried to make
the code more explicit about the supported conditions.

This fixes NEON being unable to select VCMPZ with HS conditions, and
fixes some incorrect MVE patterns.

Fixes #58514.

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

Gbp-Pq: Name fix-mesa-build.patch
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/vcmpz.ll
llvm/test/CodeGen/Thumb2/mve-pred-and.ll
llvm/test/CodeGen/Thumb2/mve-pred-or.ll
llvm/test/CodeGen/Thumb2/mve-pred-xor.ll
llvm/test/CodeGen/Thumb2/mve-vcmpz.ll