Skip to content

[CIR] Fix offset calculation for global view #1627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fangyi-zhou
Copy link

@fangyi-zhou fangyi-zhou commented May 17, 2025

This commit attempts to un-xfail globals-ref-globals test (#1497), which was causing a crash in addition to GEP changes.

The crash was caused by incorrect offsets being calculated for global view indices. The original calculation did not take paddings into consideration, hence triggering a crash. This commit adds type alignment when calculating the offset, which will take care of paddings.

Further modification to globals-ref-globals test includes fixing some struct names that got changed, as well as replacing the expects with constant folded GEP.

This commit attempts to un-xfail `globals-ref-globals` test, which was
causing a crash in addition to GEP changes.

The crash was caused by incorrect offsets being calculated for global
view indices. The original calculation did not take paddings into
consideration, hence triggering a crash. This commit adds type alignment
when calculating the offset, which will take care of paddings.

Further modification to `globals-ref-globals` test includes fixing some
struct names that got changed, as well as replacing the expects with
constant folded GEP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants