[ConstantFold][SVE] Fix constant folding for scalable vector unary operations.
authorHuihui Zhang <huihuiz@quicinc.com>
Thu, 30 Jan 2020 18:44:20 +0000 (10:44 -0800)
committerHuihui Zhang <huihuiz@quicinc.com>
Thu, 30 Jan 2020 18:45:15 +0000 (10:45 -0800)
commit34e6552dcbb4f6647746588bb35591a97a7992a3
tree859cf66a961cd1f7d5473cbc85e12558e551741a
parent0610637aac9cf2dedbb92da2d52dfbfd9b6331d2
[ConstantFold][SVE] Fix constant folding for scalable vector unary operations.

Summary:
Similar to issue D71445. Scalable vector should not be evaluated element by element.
Add support to handle scalable vector UndefValue.

Reviewers: sdesmalen, efriedma, apazos, huntergr, willlovett

Reviewed By: efriedma

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73678
llvm/lib/IR/ConstantFold.cpp
llvm/test/Analysis/ConstantFolding/vscale.ll