[CodeGen] Fix SimplifyDemandedBits for scalable vectors
authorDavid Sherwood <david.sherwood@arm.com>
Tue, 26 May 2020 06:46:01 +0000 (07:46 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Fri, 19 Jun 2020 06:59:35 +0000 (07:59 +0100)
commit7edc7f6edbcb5be439886c271a71df43b3f0a8e3
tree1e2281111f40d970089508c3a7d9e55374a11c78
parent9e811b0d932c9e808f1ec4f208591f0dd20ca55f
[CodeGen] Fix SimplifyDemandedBits for scalable vectors

For now I have changed SimplifyDemandedBits and it's various callers
to assume we know nothing for scalable vectors and to ignore the
demanded bits completely. I have also done something similar for
SimplifyDemandedVectorElts. These changes fix up lots of warnings
due to calls to EVT::getVectorNumElements() for types with scalable
vectors. These functions are all used for optimisations, rather than
functional requirements. In future we can revisit this code if
there is a need to improve code quality for SVE.

Differential Revision: https://reviews.llvm.org/D80537
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/sve-int-arith.ll
llvm/test/CodeGen/AArch64/sve-int-imm.ll
llvm/test/CodeGen/AArch64/sve-int-log-imm.ll
llvm/test/CodeGen/AArch64/sve-int-log.ll
llvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll
llvm/test/CodeGen/AArch64/sve-intrinsics-reinterpret.ll
llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp