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

[CodeGen] Fix generating permute bytes from register pair when the initial values are undefined #74437

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

mmoadeli
Copy link
Contributor

@mmoadeli mmoadeli commented Dec 5, 2023

When generating the permute bytes for the prmt instruction, the existence of an undefined initial value initialises the int32 that holds the mask with all 1's (0xFFFFFFFF). That initialization subsequently leads to complications during the subsequent OR operation, leading to inaccuracies in populating mask values for the following bytes. Consequently, the final value persists as a constant -1, irrespective of the actual mask values that succeed the initial set value.

@mmoadeli mmoadeli changed the title Fix generating permute bytes from register pair when the initial values are undefined [CodeGen] Fix generating permute bytes from register pair when the initial values are undefined Dec 5, 2023
@ldrumm ldrumm requested a review from Artem-B December 12, 2023 15:09
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp Outdated Show resolved Hide resolved
@Artem-B Artem-B merged commit aa23e49 into llvm:main Jan 16, 2024
4 checks passed
jsji pushed a commit to intel/llvm that referenced this pull request Jan 19, 2024
#11840 is resolved by usptreaming
the fix in #12068 to
llvm/llvm-project#74437.
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
…ial values are undefined (llvm#74437)

When generating the permute bytes for the prmt instruction, the
existence of an undefined initial value initialises the int32 that holds
the mask with all 1's (0xFFFFFFFF). That initialization subsequently
leads to complications during the subsequent OR operation, leading to
inaccuracies in populating mask values for the following bytes.
Consequently, the final value persists as a constant -1, irrespective of
the actual mask values that succeed the initial set value.
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.

None yet

2 participants