Skip to content

Conversation

seven-mile
Copy link
Collaborator

The pattern call {{.*}} i32 mismatches call i32 due to double spaces surrounding {{.*}}. This patch removes the first space to fix the failure.

@seven-mile
Copy link
Collaborator Author

NOTE: The test failure occurs on two of my environments (Linux + Windows), but seemingly not on CI. Not sure about the reason. @advay168 Do you have any clue?😉

@advay168
Copy link
Contributor

The expected output is something like call range(i32 0, 1024) i32 @llvm.nvvm.read.ptx.sreg.tid.x. I'm not sure why the range attribute isn't present in your environment.

@seven-mile
Copy link
Collaborator Author

Thanks for the clues! After investigation, I discovered that the range(i32 1, 65536) metadata is only attached to intrinsic calls when the NVPTX target is enabled. This metadata insertion is handled by the nvvm-intr-range pass.

Since this metadata addition occurs during mid-end optimizations, it falls outside the scope of CodeGen phase testing. This PR adjusts the CHECK lines to maintain consistency with the validation approach used in the OG counterpart.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making tests for flexible sounds great, thanks!

@bcardosolopes bcardosolopes merged commit 15bf54a into main Mar 17, 2025
7 checks passed
lanza pushed a commit that referenced this pull request Mar 18, 2025
…1486)

The pattern `call {{.*}} i32` mismatches `call i32` due to double spaces
surrounding `{{.*}}`. This patch removes the first space to fix the
failure.
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
…lvm#1486)

The pattern `call {{.*}} i32` mismatches `call i32` due to double spaces
surrounding `{{.*}}`. This patch removes the first space to fix the
failure.
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.

3 participants