Skip to content
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

Intervals are overlapping #101859

Closed
DianQK opened this issue Aug 4, 2024 · 0 comments · Fixed by #101860
Closed

Intervals are overlapping #101859

DianQK opened this issue Aug 4, 2024 · 0 comments · Fixed by #101860
Assignees
Labels

Comments

@DianQK
Copy link
Member

DianQK commented Aug 4, 2024

I tried the following IR:

define i8 @foo(ptr %arg, i8 %arg1) {
bb:
  %i = load i8, ptr %arg, align 1, !range !{i8 127, i8 -20}
  %i2 = load i8, ptr %arg, align 1, !range !{i8 -27, i8 -24, i8 -20, i8 -17}
  %i3 = add i8 %i, %i2
  ret i8 %i3
}

I expected a successful optimization, but I encountered a validation error:

Intervals are overlapping
!0 = !{i8 -27, i8 -24, i8 127, i8 -17}
LLVM ERROR: Broken module found, compilation aborted!

https://llvm.godbolt.org/z/33nd1fxnv

@DianQK DianQK self-assigned this Aug 4, 2024
@DianQK DianQK closed this as completed in 4377656 Aug 4, 2024
llvmbot pushed a commit to llvmbot/llvm-project that referenced this issue Aug 4, 2024
Fixes llvm#101859.

If we have at least 2 ranges, we have to try to merge the last and first
ones to handle the wrap range.

(cherry picked from commit 4377656)
tru pushed a commit to llvmbot/llvm-project that referenced this issue Aug 5, 2024
Fixes llvm#101859.

If we have at least 2 ranges, we have to try to merge the last and first
ones to handle the wrap range.

(cherry picked from commit 4377656)
banach-space pushed a commit to banach-space/llvm-project that referenced this issue Aug 7, 2024
Fixes llvm#101859.

If we have at least 2 ranges, we have to try to merge the last and first
ones to handle the wrap range.
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this issue Aug 15, 2024
Fixes llvm#101859.

If we have at least 2 ranges, we have to try to merge the last and first
ones to handle the wrap range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants