HomePhabricator

[ConstantFold][SVE] Fix constant folding for scalable vector compareā€¦

Authored by huihuiz on Mar 12 2020, 3:59 PM.

Description

[ConstantFold][SVE] Fix constant folding for scalable vector compare instruction.

Summary:
Do not iterate on scalable vector. Also do not return constant scalable vector
from ConstantInt::get().
Fix result type by using getElementCount() instead of getNumElements().

Reviewers: sdesmalen, efriedma, apazos, huntergr, willlovett

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73753