This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Fix invalid use of VectorType::getNumElements() in PatternMatch
ClosedPublic

Authored by ctetreau on Apr 30 2020, 12:20 PM.

Details

Summary

Update cst_pred_ty to only work on FixedVectorType. It operates on
integers and integer vectors, and returns true if the predicate returns
true for all elements of the vector. This operation is not possible on
scalable vectors. Make this behavior explicit in the code and document
the fact that it only tests fixed width vectors.

Identified by test LLVM.Transforms/InstCombine::nsw.ll

Diff Detail