[IR][InstCombine] Support scalable vector splats ConstantExprs in Constant::getUnique...
authorCraig Topper <craig.topper@sifive.com>
Mon, 26 Sep 2022 21:53:06 +0000 (14:53 -0700)
committerCraig Topper <craig.topper@sifive.com>
Mon, 26 Sep 2022 21:55:15 +0000 (14:55 -0700)
commit90b695d1f24cd9d6832acf9c7c64ec28a45bb4a1
tree0040554be6b88707c21bb45f84021bae01ac4470
parent0ca1051bfc6e9548763f0a52641733393c33a427
[IR][InstCombine] Support scalable vector splats ConstantExprs in Constant::getUniqueInteger().

I've left the getAggregateElement as a fast path for non-ConstantExprs
to avoid a call to getSplatValue in release builds.

Fixes PR57989.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D134670
llvm/lib/IR/Constants.cpp
llvm/test/Transforms/InstCombine/select.ll