-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Replace interp__builtin_blend with interp__builtin_ia32_shuffle_gener… #170217
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
base: main
Are you sure you want to change the base?
Conversation
…ic implementation
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-clang Author: None (adbox53) ChangesFixes #169994 Full diff: https://github.com/llvm/llvm-project/pull/170217.diff 1 Files Affected:
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 971fce541bb88..bbd07759883e1 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -4624,7 +4624,15 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
case clang::X86::BI__builtin_ia32_pblendw256:
case clang::X86::BI__builtin_ia32_pblendd128:
case clang::X86::BI__builtin_ia32_pblendd256:
- return interp__builtin_blend(S, OpPC, Call);
+ return interp__builtin_ia32_shuffle_generic(
+ S, OpPC, Call, [](unsigned DstIdx, unsigned ShuffleMask) {
+ // bit index for mask
+ unsigned maskBit = (ShuffleMask >> (DstIdx % 8)) & 0x1;
+ unsigned SrcVecIdx = maskBit ? 1 : 0; // 1 = TrueVec, 0 = FalseVec
+ return std::pair<unsigned, int>{SrcVecIdx, static_cast<int>(DstIdx)};
+ });
+
+
case clang::X86::BI__builtin_ia32_blendvpd:
case clang::X86::BI__builtin_ia32_blendvpd256:
|
Co-authored-by: Timm Baeder <tbaeder@redhat.com>
|
Updated variable name as requested, ready for review! |
tbaederr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interp__builtin_blend is unused now, isn't it?
|
yes, the instance of |
|
The call was. You can remove the old function if it isn't used anymore. |
|
Ok sure, I updated the PR to remove the unused |
Fixes #169994