https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/159623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/156063
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
Changed this to use the type's alignment. I can change the interface to use a
`V *` instead of `vec *`.
https://github.com/llvm/llvm-project/pull/156063
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/157895
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
ping
https://github.com/llvm/llvm-project/pull/157895
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -423,9 +423,10 @@ Error offloading::intel::containerizeOpenMPSPIRVImage(
Header.Class = ELF::ELFCLASS64;
Header.Data = ELF::ELFDATA2LSB;
Header.Type = ELF::ET_DYN;
- // Use an existing Intel machine type as there is not one specifically for
- // Intel GPUs.
- Header
@@ -1513,12 +1513,17 @@ static void initFeatureMaps(const ASTContext &Ctx,
static bool checkAVXParamFeature(DiagnosticsEngine &Diag,
SourceLocation CallLoc,
+ const FunctionDecl &Callee,
https://github.com/jhuber6 approved this pull request.
LG on my end, the OpenMP and libc runtimes are already using the builtin for
things that require the wavefront size.
https://github.com/llvm/llvm-project/pull/157463
___
cfe-commits mailing list
c
@@ -112,13 +112,39 @@ setupIndirectCallTable(DeviceTy &Device,
__tgt_device_image *Image,
llvm::SmallVector> IndirectCallTable;
for (const auto &Entry : Entries) {
if (Entry.Kind != llvm::object::OffloadKind::OFK_OpenMP ||
-Entry.Size == 0 || !(Entry.Flags & OM
https://github.com/jhuber6 commented:
Needs a runtime test
https://github.com/llvm/llvm-project/pull/159856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1771,12 +1771,126 @@ void CGOpenMPRuntime::emitDeclareTargetFunction(const
FunctionDecl *FD,
Addr->setVisibility(llvm::GlobalValue::ProtectedVisibility);
}
+ // Register the indirect Vtable:
+ // This is similar to OMPTargetGlobalVarEntryIndirect, except that the
@@ -0,0 +1,280 @@
+///==///
+// RUN: %clang_cc1 -DCK1 -verify -fopenmp -Wno-openmp-mapping -x c++ -triple
x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-cuda-mode
-emit-llvm-bc %s -o %
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/159856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -443,7 +444,9 @@ static int loadImagesOntoDevice(DeviceTy &Device) {
// the device to point to the memory on the host.
if ((PM->getRequirements() & OMP_REQ_UNIFIED_SHARED_MEMORY) ||
(PM->getRequirements() & OMPX_REQ_AUTO_ZERO_COPY)) {
-
@@ -112,13 +112,39 @@ setupIndirectCallTable(DeviceTy &Device,
__tgt_device_image *Image,
llvm::SmallVector> IndirectCallTable;
for (const auto &Entry : Entries) {
if (Entry.Kind != llvm::object::OffloadKind::OFK_OpenMP ||
-Entry.Size == 0 || !(Entry.Flags & OM
@@ -423,9 +423,10 @@ Error offloading::intel::containerizeOpenMPSPIRVImage(
Header.Class = ELF::ELFCLASS64;
Header.Data = ELF::ELFDATA2LSB;
Header.Type = ELF::ET_DYN;
- // Use an existing Intel machine type as there is not one specifically for
- // Intel GPUs.
- Header
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/157128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -423,9 +423,10 @@ Error offloading::intel::containerizeOpenMPSPIRVImage(
Header.Class = ELF::ELFCLASS64;
Header.Data = ELF::ELFDATA2LSB;
Header.Type = ELF::ET_DYN;
- // Use an existing Intel machine type as there is not one specifically for
- // Intel GPUs.
- Header
@@ -3655,11 +3655,6 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy
&GenericDevice,
KernelArgsTy &KernelArgs,
KernelLaunchParamsTy LaunchParams,
AsyncInfoWrapperTy &AsyncInfo
@@ -3655,11 +3655,6 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy
&GenericDevice,
KernelArgsTy &KernelArgs,
KernelLaunchParamsTy LaunchParams,
AsyncInfoWrapperTy &AsyncInfo
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -triple x86_64 -fsyntax-only -verify %s
+
+typedef _Bool bool;
+
+typedef __attribute__((ext_vector_type(8))) int v8i;
+typedef __attribute__((ext_vector_type(8))) bool v8b;
+typedef __attribute__((ext_vector_type(4))) float v4f;
+typedef __att
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/158724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 auto_merge_enabled
https://github.com/llvm/llvm-project/pull/158724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/123359
>From 5123637a52d6575a5dce1344e5e465004f7bf6b7 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 17 Jan 2025 09:35:34 -0600
Subject: [PATCH] [HIP] Move HIP to the new driver by default
Summary:
This patch
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157895
>From 8d5d1de75a8b97d060c6ee564ec6f74e6defb602 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 10 Sep 2025 11:41:25 -0500
Subject: [PATCH 1/4] [Clang] Add vector gather / scatter builtins to clang
Summar
@@ -2361,6 +2363,101 @@ static ExprResult BuiltinMaskedStore(Sema &S, CallExpr
*TheCall) {
return TheCall;
}
+static ExprResult BuiltinMaskedGather(Sema &S, CallExpr *TheCall) {
+ if (S.checkArgCountRange(TheCall, 3, 4))
+return ExprError();
+
+ Expr *MaskArg = TheCal
jhuber6 wrote:
ping
https://github.com/llvm/llvm-project/pull/157895
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/158369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157895
>From 105d21ef27d1993527924e1da5f181dc9a67eff1 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 10 Sep 2025 11:41:25 -0500
Subject: [PATCH 1/3] [Clang] Add vector gather / scatter builtins to clang
Summar
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/157893
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157895
>From 4b91a54c49d6b87ef85e08dd94b553c807e14fe8 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 10 Sep 2025 11:41:25 -0500
Subject: [PATCH 1/2] [Clang] Add vector gather / scatter builtins to clang
Summar
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/158369
Summary:
Clang supports boolean vectors as an extension to the vector model.
These are commonly used to represent mask vectors in many vector ISAs.
Currently, using these is quite difficult because all of the vec
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157895
>From 105d21ef27d1993527924e1da5f181dc9a67eff1 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 10 Sep 2025 11:41:25 -0500
Subject: [PATCH 1/3] [Clang] Add vector gather / scatter builtins to clang
Summar
https://github.com/jhuber6 commented:
Can we keep the OMPKinds definitions? I figure we'll need those for the CPU
side.
https://github.com/llvm/llvm-project/pull/157893
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
jhuber6 wrote:
> Does this actually fix the linked bug report? That's about `always_inline`
> functions, which still have default visibility.
Right, forgot to do a check on that. Hopefully I can just check the attribute
there.
https://github.com/llvm/llvm-project/pull/157570
_
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157895
>From 105d21ef27d1993527924e1da5f181dc9a67eff1 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 10 Sep 2025 11:41:25 -0500
Subject: [PATCH 1/3] [Clang] Add vector gather / scatter builtins to clang
Summar
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/157570
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157570
>From b8bf2ff118a39f1ef76b67e6e8dcba72f5b91e3e Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Sep 2025 17:22:33 -0500
Subject: [PATCH 1/2] [X86] Relax AVX ABI warning on internal functions
Summary:
Th
jhuber6 wrote:
> Deferencing a pointer, __builtin_memcpy, and most other operations that
> involve accessing pointers, currently assume pointers are naturally aligned.
> The exact representation of this in LLVM IR varies, but the fundamental
> assumption is that you're following normal C/C++ s
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/157172
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/157570
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/157128
>From 97ee7e3b1cfc06b434b71987b9b0a9fd8b14a236 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 5 Sep 2025 10:42:07 -0500
Subject: [PATCH 1/2] [Clang] Rename elementwise builtins to `clzg` and `ctzg`
Summ
jhuber6 wrote:
> I don't really mind what they're called. As I said in the original RFC and PR
> that introduced the builtins, I have no particular favourites.
>
> However, do note that the elementwise builtins are not _exactly_ like
> clzg/ctzg in that they don't have _target-specific_ zero-i
jhuber6 wrote:
> No objections, but only because we haven't had these builtins for very long.
Yeah, they haven't made it into a release so it should be fair game.
https://github.com/llvm/llvm-project/pull/157128
___
cfe-commits mailing list
cfe-commit
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/157128
Summary:
The added bit counting builtins for vectors used `cttz` and `ctlz`,
which is consistent with the LLVM naming convention. However, these are
clang builtins and implement exactly the `__builtin_ctzg` and
`
https://github.com/jhuber6 approved this pull request.
I'm not going to block this, but I think long term being divergent with CUDA
code generation here is unwise. We should let both lower to the same but change
the runtime calls, the runtime call then goes to `cuLaunchkernel` which expects
a
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M,
GlobalVariable *FatbinDesc,
// Add this function to constructors.
appendToGlobalCtors(M, CtorFunc, /*Priority=*/101);
}
+
+/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images.
+stru
https://github.com/jhuber6 approved this pull request.
Seems fine, though I do wonder what's the point of SPIR-V being generic if we
hard-code behavior for different 'flavors' anyway.
https://github.com/llvm/llvm-project/pull/135251
___
cfe-commits ma
https://github.com/jhuber6 approved this pull request.
libc and openmp LG
https://github.com/llvm/llvm-project/pull/156270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/156479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M,
GlobalVariable *FatbinDesc,
// Add this function to constructors.
appendToGlobalCtors(M, CtorFunc, /*Priority=*/101);
}
+
+/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images.
+stru
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/156479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 approved this pull request.
Seems reasonable, guessing this is SPIR-V only? Sometimes default address
spaces dependent on language cause issues when mixing IR.
https://github.com/llvm/llvm-project/pull/156520
___
cfe-commits
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/156520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> In theory we can lower masked load/store on any target; it's just a question
> of how terrible the resulting code is. And on a target that doesn't support
> unaligned load/store, the answer is, pretty terrible. But basically
> everything that supports vectors has unaligned acc
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/156479
Summary:
This was forbidden previously even which made us divergent with the GCC
implementation. Permit this by simply removing this Sema check.
Fixes: https://github.com/llvm/llvm-project/issues/156463
>From
@@ -955,8 +962,9 @@ Constant *OpenMPIRBuilder::getOrCreateSrcLocStr(StringRef
LocStr,
GV.getInitializer() == Initializer)
return SrcLocStr = ConstantExpr::getPointerCast(&GV, Int8Ptr);
-SrcLocStr = Builder.CreateGlobalString(LocStr, /* Name */ "",
-
jhuber6 wrote:
> I finally got some IR and maybe some other info. With `-opt-bisect-limit` it
> appears that the issue is coming from GVN on the function
> `_ZN47LlvmLibcCharacterConverterUTF32To8Test_FourByte3RunEv`. After that the
> particular tests fails at runtime.
>
> I attached the IR a
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/147508
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/147508
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M,
GlobalVariable *FatbinDesc,
// Add this function to constructors.
appendToGlobalCtors(M, CtorFunc, /*Priority=*/101);
}
+
+/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images.
+stru
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/147508
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/156063
Summary:
Right now these enformce alignment, which isn't convenient for the user
on platforms that support unaligned accesses. The options are to either
permit passing the alignment manually, or just assume it's
@@ -11016,7 +11016,7 @@ def err_sizeless_nonlocal : Error<
def err_vec_masked_load_store_ptr : Error<
"%ordinal0 argument must be a %1">;
def err_vec_masked_load_store_size : Error<
- "all arguments to %0 must have the same number of elements (was %1 and %2)">;
+ "all argument
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/156042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -950,6 +950,11 @@ argument is always boolean mask vector. The
``__builtin_masked_load`` builtin
takes an optional third vector argument that will be used for the result of the
masked-off lanes. These builtins assume the memory is always aligned.
+The ``__builtin_masked_exp
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/156042
>From 1221affdc11f757ced2303a894950badde4b9833 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 29 Aug 2025 09:57:19 -0500
Subject: [PATCH 1/3] [Clang] Add masked vector builtins for expand and
compress a
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/156042
>From 1221affdc11f757ced2303a894950badde4b9833 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 29 Aug 2025 09:57:19 -0500
Subject: [PATCH 1/2] [Clang] Add masked vector builtins for expand and
compress a
@@ -11016,7 +11016,7 @@ def err_sizeless_nonlocal : Error<
def err_vec_masked_load_store_ptr : Error<
"%ordinal0 argument must be a %1">;
def err_vec_masked_load_store_size : Error<
- "all arguments to %0 must have the same number of elements (was %1 and %2)">;
+ "all argument
@@ -950,6 +950,11 @@ argument is always boolean mask vector. The
``__builtin_masked_load`` builtin
takes an optional third vector argument that will be used for the result of the
masked-off lanes. These builtins assume the memory is always aligned.
+The ``__builtin_masked_exp
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/156042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/156042
Summary:
The interface here is nearly indentical to the already added masked
loads and stores. These bind to very similar intrinsics so we add them
here.
>From 1221affdc11f757ced2303a894950badde4b9833 Mon Sep 1
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/155652
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -946,7 +946,9 @@ Let ``VT`` be a vector type and ``ET`` the element type of
``VT``.
Each builtin accesses memory according to a provided boolean mask. These are
provided as ``__builtin_masked_load`` and ``__builtin_masked_store``. The first
-argument is always boolean mask
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/155652
>From 3a62febbcf70485bc287f3ea713a8eff61cf215d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 27 Aug 2025 11:35:56 -0500
Subject: [PATCH 1/3] [Clang] Update `__builtin_masked_load` to accept
passthrough
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/155652
>From 3a62febbcf70485bc287f3ea713a8eff61cf215d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 27 Aug 2025 11:35:56 -0500
Subject: [PATCH 1/2] [Clang] Update `__builtin_masked_load` to accept
passthrough
jhuber6 wrote:
ping
https://github.com/llvm/llvm-project/pull/154203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154203
>From cc9d2d9e4923bad0d904d251fa116ad388b0b6ac Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 18 Aug 2025 15:59:46 -0500
Subject: [PATCH 1/6] [Clang] Support generic bit counting builtins on fixed
boole
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154817
>From d2eceb10f6bb33c28f4891b0664e4978b7a76c88 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 21 Aug 2025 13:14:03 -0500
Subject: [PATCH] [Clang] Fix incorrect return type for
`__builtin_shufflevector`
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/154817
Summary:
The `__builtin_shufflevector` call would return a GCC vector in all
cases where the vector type was increased. Change this to preserve
whether or not this was an extended vector.
Fixes: https://github.c
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/154203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 commented:
Do you know if gcc auto links these and this behavior matches?
https://github.com/llvm/llvm-project/pull/154826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154817
>From d2eceb10f6bb33c28f4891b0664e4978b7a76c88 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 21 Aug 2025 13:14:03 -0500
Subject: [PATCH] [Clang] Fix incorrect return type for
`__builtin_shufflevector`
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154817
>From d2eceb10f6bb33c28f4891b0664e4978b7a76c88 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 21 Aug 2025 13:14:03 -0500
Subject: [PATCH] [Clang] Fix incorrect return type for
`__builtin_shufflevector`
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/154203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4213,7 +4213,7 @@ such as ``unsigned __int128`` and C23 ``unsigned
_BitInt(N)``.
``__builtin_clzg`` (respectively ``__builtin_ctzg``) returns the number of
leading (respectively trailing) 0 bits in the first argument. The first
argument
-can be of any unsigned integer ty
@@ -4213,7 +4213,7 @@ such as ``unsigned __int128`` and C23 ``unsigned
_BitInt(N)``.
``__builtin_clzg`` (respectively ``__builtin_ctzg``) returns the number of
leading (respectively trailing) 0 bits in the first argument. The first
argument
-can be of any unsigned integer ty
@@ -1693,6 +1693,22 @@ getBitTestAtomicOrdering(BitTest::InterlockingKind I) {
llvm_unreachable("invalid interlocking");
}
+static llvm::Value *EmitIntegerExpr(CodeGenFunction &CGF, const Expr *E) {
+ llvm::Value *ArgValue = CGF.EmitScalarExpr(E);
+ llvm::Type *ArgType = A
@@ -13455,6 +13455,10 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
case Builtin::BI__lzcnt16: // Microsoft variants of count leading-zeroes
case Builtin::BI__lzcnt:
case Builtin::BI__lzcnt64: {
+// TODO: Handle boolean vectors in constexpr conte
@@ -4213,7 +4213,7 @@ such as ``unsigned __int128`` and C23 ``unsigned
_BitInt(N)``.
``__builtin_clzg`` (respectively ``__builtin_ctzg``) returns the number of
leading (respectively trailing) 0 bits in the first argument. The first
argument
-can be of any unsigned integer ty
jhuber6 wrote:
> Is the idea behind only supporting boolean vectors that the operation on
> arbitrary integer vectors probably ought to be a vector-to-vector operation?
> That seems reasonable, but are we going to regret having inconsistent
> behavior between different vector types, then?
Tha
https://github.com/jhuber6 commented:
This seems like a pretty massive work-around. Could you be more specific about
what the issue is? I'd expect LLVM optimizations to preserve everything we
need, and if they don't it's because we're breaking the rules / overriding
symbols with `-mlink-builti
jhuber6 wrote:
> > I think `-ffat-lto-objects` uses exclude metadata, but I'm not overly
> > familiar with what that's intended to do.
>
> Effect of exclude kind:
> https://discourse.llvm.org/t/end-to-end-fembed-bitcode-llvmbc-and-llvmcmd/56265/14?u=haohaiwen
I know what the exclude option th
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154203
>From 6aee3cfe0db0602479e8d5fedcb3eb6b699e2db3 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 18 Aug 2025 15:59:46 -0500
Subject: [PATCH] [Clang] Support generic bit counting builtins on fixed
boolean v
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/154464
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/154227
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154203
>From c2f86a3591a4e44e875cd00967ed8679876de287 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 18 Aug 2025 15:59:46 -0500
Subject: [PATCH] [Clang] Support generic bit counting builtins on fixed
boolean v
jhuber6 wrote:
> > Dropping in after the fact, is there a reason we called this
> > `__builtin_elementwise_ctlz` instead of `__builtin_elementwise_clzg`? The
> > builtin is just `clzg` done on each element so the name is confusing me.
>
> It matches the llvm intrinsic name, and the second argu
jhuber6 wrote:
Dropping in after the fact, is there a reason we called this
`__builtin_elementwise_ctlz` instead of `__builtin_elementwise_clzg`? The
builtin is just `clzg` done on each element so the name is confusing me.
https://github.com/llvm/llvm-project/pull/131995
__
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/154464
>From 4d8e7e1b3602f3c6e40be994fe495d30523c9a5c Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 19 Aug 2025 23:01:03 -0500
Subject: [PATCH] [Clang] Add builtins for masked vector loads / stores
Summary:
C
1 - 100 of 2292 matches
Mail list logo