Skip to content
Commit 7a67e41b authored by Markus Böck's avatar Markus Böck
Browse files

[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
parent 1400a3cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment