OSDN Git Service

[ARM] PREDICATE_CAST demanded bits
authorDavid Green <david.green@arm.com>
Tue, 1 Dec 2020 09:04:36 +0000 (09:04 +0000)
committerDavid Green <david.green@arm.com>
Tue, 1 Dec 2020 10:32:24 +0000 (10:32 +0000)
commit7923d71b4a7a88f97c8a3efe1eb1473a4b2f5bf3
tree9d258fad1b6cb84fa3d3100d67bfb51ac06672bc
parent839c9635edce4f6ed348b154a4e755ff8263d366
[ARM] PREDICATE_CAST demanded bits

The PREDICATE_CAST node is used to model moves between MVE predicate
registers and gpr's, and eventually become a VMSR p0, rn. When moving to
a predicate only the bottom 16 bits of the sources register are
demanded. This adds a simple fold for that, allowing it to potentially
remove instructions like uxth.

Differential Revision: https://reviews.llvm.org/D92213
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-pred-bitcast.ll
llvm/test/CodeGen/Thumb2/mve-pred-constfold.ll