diff options
author | Craig Topper <craig.topper@sifive.com> | 2023-10-02 09:13:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 09:13:33 -0700 |
commit | 8f4ffbbaf7ba6bde6f3f2731669b28b1c9a46505 (patch) | |
tree | c4d2432a9bb0b438f466f527f83cc2b26f0783a2 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | c2fd3ebe83444de05482d5a5a332dc2cf0db1a92 (diff) | |
download | llvm-8f4ffbbaf7ba6bde6f3f2731669b28b1c9a46505.zip llvm-8f4ffbbaf7ba6bde6f3f2731669b28b1c9a46505.tar.gz llvm-8f4ffbbaf7ba6bde6f3f2731669b28b1c9a46505.tar.bz2 |
[RISCV] Create new build vector instead of relying on getNode constan… (#67944)
…t folding.
We want to create a build_vector with narrower elements here. Normally
getNode on the ISD::TRUNCATE will constant fold this to a new
BUILD_VECTOR. If it doesn't constant fold, we end up with a cycle in the
DAG because we truncate the node we are replacing. Constant folding can
fail if one of the elements is an opaque constant.
The failing case I saw involved an opaque constant created by a memset
that was expanded. Not sure exactly what happened after that.
This patch creates a new BUILD_VECTOR with the new type directly.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions