diff options
author | Markus Böck <markus.boeck02@gmail.com> | 2022-07-27 14:42:24 +0200 |
---|---|---|
committer | Markus Böck <markus.boeck02@gmail.com> | 2022-07-27 14:42:35 +0200 |
commit | 7a67e41be2a56df8629cdb3f6b529855ecce3ed4 (patch) | |
tree | 8037c3d17889fb3024394f2f377ee669cb51d4ad /clang/unittests/Interpreter/InterpreterTest.cpp | |
parent | 1400a3cb8d53c8c10e23ecdd4f241ea9cff404b5 (diff) | |
download | llvm-7a67e41be2a56df8629cdb3f6b529855ecce3ed4.zip llvm-7a67e41be2a56df8629cdb3f6b529855ecce3ed4.tar.gz llvm-7a67e41be2a56df8629cdb3f6b529855ecce3ed4.tar.bz2 |
[mlir][LLVM] Fix incorrect GEP fold with struct constants
The fold in it's current state only checks whether the amount of dynamic indices is 1. This does however not check for the presence of any struct indices, leading to an incorrect fold.
This patch fixes that issue by checking that struct indices are 1, which in addition to the pre-existing check that dynamic indices are 1, guarantees that the single index is a dynamic one.
Differential Revision: https://reviews.llvm.org/D129374
Diffstat (limited to 'clang/unittests/Interpreter/InterpreterTest.cpp')
0 files changed, 0 insertions, 0 deletions