[ARM] Add some VCMP folding and canonicalisation
authorDavid Green <david.green@arm.com>
Mon, 2 Dec 2019 14:47:22 +0000 (14:47 +0000)
committerDavid Green <david.green@arm.com>
Mon, 2 Dec 2019 19:57:12 +0000 (19:57 +0000)
commit57d96ab593dfff39dc6eb8fa5f25eaf64af26ee1
tree588a831b17cbc17e468054e0fbcbf785971383dd
parent63aff5cd3c83cc1000cf9c85388e62071086dda2
[ARM] Add some VCMP folding and canonicalisation

The VCMP instructions in MVE can accept a register or ZR, but only as
the right hand operator. Most of the time this will already be correct
because the icmp will have been canonicalised that way already. There
are some cases in the lowering of float conditions that this will not
apply to though. This code should fix up those cases.

Differential Revision: https://reviews.llvm.org/D70822
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/Utils/ARMBaseInfo.h
llvm/test/CodeGen/Thumb2/mve-vcmpfz.ll