[SVE] Update EmitSVEPredicateCast to take a ScalableVectorType
authorChristopher Tetreault <ctetreau@quicinc.com>
Tue, 28 Apr 2020 17:32:55 +0000 (10:32 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Tue, 28 Apr 2020 18:22:20 +0000 (11:22 -0700)
commitef3678cfeea69a882bd58df42b6d21a0860703fd
treea6740aceb8b4a403394b9b34b810e0a68a0b9eab
parent1e43cab3c6724b2f9089a0a2b42e8dfdfdd1a299
[SVE] Update EmitSVEPredicateCast to take a ScalableVectorType

Summary:
Removes usage of VectorType::getNumElements identified by test located
at CodeGen/aarch64-sve-intrinsics/acle_sve_abs.c. Since the type is an
SVE predicate vector, it makes sense to specialize the code for scalable
vectors only.

Reviewers: rengolin, efriedma

Reviewed By: efriedma

Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78958
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CodeGenFunction.h