diff options
author | Luke Lau <luke@igalia.com> | 2025-04-02 21:21:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 21:21:52 +0100 |
commit | df9e5ae5b40c4d245d904a2565e46f5b7ab9c7c8 (patch) | |
tree | f4796fce1b6adefba144e26c7670a7da4b53b248 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 564e04b703dc5df062f862e32c00bf1a1716f96f (diff) | |
download | llvm-df9e5ae5b40c4d245d904a2565e46f5b7ab9c7c8.zip llvm-df9e5ae5b40c4d245d904a2565e46f5b7ab9c7c8.tar.gz llvm-df9e5ae5b40c4d245d904a2565e46f5b7ab9c7c8.tar.bz2 |
[InstCombine] Match scalable splats in m_ImmConstant (#132522)
#118806 fixed an infinite loop in FoldShiftByConstant that could occur
when the shift amount was a ConstantExpr.
However this meant that FoldShiftByConstant no longer kicked in for
scalable vectors because scalable splats are represented by
ConstantExprs.
This fixes it by allowing scalable splats of non-ConstantExprs in
m_ImmConstant, which also fixes a few other test cases where scalable
splats were being missed.
But I'm also hoping that UseConstantIntForScalableSplat will eventually
remove the need for this.
I noticed this when trying to reverse a combine on RISC-V in #132245,
and saw that the resulting vector and scalar forms were different.
---------
Co-authored-by: Yingwei Zheng <dtcxzyw@qq.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions