[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 13 18:06:35 PDT 2025
================
@@ -18,6 +18,132 @@
#include "llvm/Support/AtomicOrdering.h"
#include <cstdint>
+namespace {
+
+using llvm::StringRef;
+using namespace clang;
+
+/// Attempts to apply a user-defined conversion on Arg at ArgIndex to a
+/// 32-bit-compatible type. If successful, updates TheCall's argument. Returns
+/// true if a suitable conversion was applied.
+bool tryUserDefinedConversion32Bit(Sema &SemaRef, Expr *Arg, CallExpr *TheCall,
+ unsigned ArgIndex) {
+ const CXXRecordDecl *RecordDecl = Arg->getType()->getAsCXXRecordDecl();
+ if (!RecordDecl)
+ return false;
+
+ // Iterate over class conversion operators and pick the first that yields a
+ // 32-bit type.
+ for (auto *MethodDecl : RecordDecl->methods()) {
----------------
shiltian wrote:
no auto for this case
https://github.com/llvm/llvm-project/pull/153501
More information about the cfe-commits
mailing list