aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorAmy Kwan <amy.kwan1@ibm.com>2022-10-22 17:33:14 -0500
committerAmy Kwan <amy.kwan1@ibm.com>2022-10-24 09:56:54 -0500
commit715301056ee0b12d01463ea32ff0f006392f2d12 (patch)
treeeda470380c1618aa6a7bf0abd684c1a72032795e /clang/lib/Frontend/InitPreprocessor.cpp
parent65aaecca8842dec30d03734a7fe8ce33c5afec81 (diff)
downloadllvm-715301056ee0b12d01463ea32ff0f006392f2d12.zip
llvm-715301056ee0b12d01463ea32ff0f006392f2d12.tar.gz
llvm-715301056ee0b12d01463ea32ff0f006392f2d12.tar.bz2
[PowerPC] Fix invalid cast for vector shuffles when lowering to the xxsplti32dx instruction.
When lowering vector shuffles into the xxsplti32dx instruction on Power10, we canonicalize the right operand to be a BUILD_VECTOR and as a result, get the commuted vector shuffle node. However, a vector shuffle will not always be returned as the result for a commuted vector shuffle. In such a scenario, this patch updates the original cast of a shuffle into a dyn_cast<> and checks if the shuffle is a valid vector shuffle node prior to obtaining the commuted shuffle mask. This patch also adds a new test case that demonstrates this scenario (primarily seen on 32-bit), and was originally a crash prior to this fix. Differential Revision: https://reviews.llvm.org/D135024
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions