[PATCH] D71389: [ConstantFold][SVE] Fix constant folding for bitcast.
Huihui Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 11:54:53 PST 2019
huihuiz marked an inline comment as done.
huihuiz added a comment.
In D71389#1781620 <https://reviews.llvm.org/D71389#1781620>, @spatel wrote:
> LGTM. I don't know how many of these patches are needed, but it would be slightly more efficient to create a "vscale.ll" test file and put all of the related tests in that 1 file.
Thank you Sanjay!
Yes, I will try my best to combine them. The current code base has a lot of assumption based on fixed length vector.
I am going through the IR passes, and try to fix them to the best I can.
================
Comment at: llvm/lib/IR/ConstantFold.cpp:52
+ // compile-time.
+ if (DstTy->isScalable())
+ return nullptr;
----------------
sdesmalen wrote:
> Do we want to add support for a special case here for splat operations (like the one in the test)?
Actually we can not, we will end up in scalable vector constant.
Instead of <4 x i32> <i32 1, i32 1, i32 1, i32 1>, we will need a form like "<vscale x 4 x i32> [?]"
I don't know how to express scalable vector constant in current upstream, please let me know if I get anything wrong?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71389/new/
https://reviews.llvm.org/D71389
More information about the llvm-commits
mailing list