# \#llvm

**URL:** https://discourse.julialang.org/tag/llvm/72.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Julia 1.9 on Intel Sapphire Rapid CPU doesn't work](https://discourse.julialang.org/t/julia-1-9-on-intel-sapphire-rapid-cpu-doesnt-work/118444)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 6\
**Last updated:** [July 25, 2026, 4:13pm UTC](https://discourse.julialang.org/t/julia-1-9-on-intel-sapphire-rapid-cpu-doesnt-work/118444 "2026-07-25T16:13:52Z")

</div>

We recently bought a new server with the latest Intel CPU (Sapphire Rapids), yet we just realized that it doesn’t work for Julia 1.9.x versions. Here’s a brief report: julia\> versioninfo() Julia Version 1.9.3 Commit bed…

---

## [Auto-differentiation of Numba LLVM IR using Enzyme.jl: linear algebra and opaque external functions](https://discourse.julialang.org/t/auto-differentiation-of-numba-llvm-ir-using-enzyme-jl-linear-algebra-and-opaque-external-functions/137799)

<div class="topic-metadata">

**Author:** [@ymardoukhi](https://discourse.julialang.org/u/ymardoukhi)\
**Replies:** 0\
**Last updated:** [June 25, 2026, 12:43pm UTC](https://discourse.julialang.org/t/auto-differentiation-of-numba-llvm-ir-using-enzyme-jl-linear-algebra-and-opaque-external-functions/137799 "2026-06-25T12:43:56Z")

</div>

This is related to the thread Get Numba LLVM IR differentiated in Julia using Enzyme.jl: differentiating Python functions decorated as Numba CFunc functions. I am sorry that this thread is quite long, but I tried to be a…

---

## [Julia vs Numba](https://discourse.julialang.org/t/julia-vs-numba/137116)

<div class="topic-metadata">

**Author:** [@lilachint](https://discourse.julialang.org/u/lilachint)\
**Replies:** 11\
**Last updated:** [May 17, 2026, 7:18am UTC](https://discourse.julialang.org/t/julia-vs-numba/137116 "2026-05-17T07:18:51Z")

</div>

I used to use Numpy+Numba for some parallel computations with @nb.njit and nb.prange in Python. How does Julia compare to that? In the Python version, I used TBB/OMP threading layers and some optimization to speed up the…

---

## [Another case of poor vectorization](https://discourse.julialang.org/t/another-case-of-poor-vectorization/136778)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 1\
**Last updated:** [April 19, 2026, 2:08pm UTC](https://discourse.julialang.org/t/another-case-of-poor-vectorization/136778 "2026-04-19T14:08:54Z")

</div>

I see poor vectorization when creating ranges as tuples. The flavor is similar to this issue, but the details are different. This time there are no comparisons involved (which were the culprit in the linked post). funct…

---

## [RepliBuild.jl](https://discourse.julialang.org/t/replibuild-jl/134065)

<div class="topic-metadata">

**Author:** [@obsidianjulua](https://discourse.julialang.org/u/obsidianjulua)\
**Replies:** 10\
**Last updated:** [December 2, 2025, 7:34pm UTC](https://discourse.julialang.org/t/replibuild-jl/134065 "2025-12-02T19:34:10Z")

</div>

Been working on a julia build orchestrator, using llvm directly and clang for deps graphs and configuring to a toml, generating executables, shared libraries, or binary wrapping in julia, without the traditional hand cod…

---

## [GLFW.jl: GLFW.Window() Segmentation Fault](https://discourse.julialang.org/t/glfw-jl-glfw-window-segmentation-fault/132972)

<div class="topic-metadata">

**Author:** [@ewillcox](https://discourse.julialang.org/u/ewillcox)\
**Replies:** 0\
**Last updated:** [October 8, 2025, 10:49am UTC](https://discourse.julialang.org/t/glfw-jl-glfw-window-segmentation-fault/132972 "2025-10-08T10:49:10Z")

</div>

The GLFW.jl package compiles correctly. pkg\> test GLFW results in an error. The error is: 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared lib for symbol XOpenDisplay is missing \[87904\] signal 11 (1): Segmentati…

---

## [Python 3.14 LLVM tail-call interpreter](https://discourse.julialang.org/t/python-3-14-llvm-tail-call-interpreter/126777)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 3\
**Last updated:** [August 11, 2025, 4:39am UTC](https://discourse.julialang.org/t/python-3-14-llvm-tail-call-interpreter/126777 "2025-08-11T04:39:38Z")

</div>

Not an expert at all, but I think this blog post from Nelson Elhage about Python 3.14 LLVM performances could interest people here: fdekerm

---

## [Get Numba LLVM IR differentiated in Julia using Enzyme.jl](https://discourse.julialang.org/t/get-numba-llvm-ir-differentiated-in-julia-using-enzyme-jl/131255)

<div class="topic-metadata">

**Author:** [@ymardoukhi](https://discourse.julialang.org/u/ymardoukhi)\
**Replies:** 15\
**Last updated:** [August 8, 2025, 9:12am UTC](https://discourse.julialang.org/t/get-numba-llvm-ir-differentiated-in-julia-using-enzyme-jl/131255 "2025-08-08T09:12:25Z")

</div>

I have seen scarce material regarding Numba and Enzyme, e.g. this Numba GitHub issue or this talk at Enzyme conference 2023. I have this simple cosine function in Python, wrapped around the numba.@cfunc decorator. From …

---

## [Why does LLVM like putting floating-point constants into RODATA so much? Is that suboptimal?](https://discourse.julialang.org/t/why-does-llvm-like-putting-floating-point-constants-into-rodata-so-much-is-that-suboptimal/130314)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [June 29, 2025, 8:36pm UTC](https://discourse.julialang.org/t/why-does-llvm-like-putting-floating-point-constants-into-rodata-so-much-is-that-suboptimal/130314 "2025-06-29T20:36:46Z")

</div>

It is almost impossible to avoid LLVM storing operands in floating-point operations into the data segment, RODATA, of the executable. For example, here the compiler converts 3 into Float64, storing the bytes into the da…

---

## [How to prevent unwanted "optimization" in SIMD code?](https://discourse.julialang.org/t/how-to-prevent-unwanted-optimization-in-simd-code/129081)

<div class="topic-metadata">

**Author:** [@lntricate](https://discourse.julialang.org/u/lntricate)\
**Replies:** 8\
**Last updated:** [May 18, 2025, 2:59am UTC](https://discourse.julialang.org/t/how-to-prevent-unwanted-optimization-in-simd-code/129081 "2025-05-18T02:59:48Z")

</div>

I’m working on writing a SIMD base64 encoding algorithm (from this paper), and I came across an annoying thing. Consider the following example method: function test\_mul(a::NTuple{16, VecElement{UInt16}}, b::NTuple{16, V…

---

## [Fancy LLVM loop transformation pass that deoptimize the code](https://discourse.julialang.org/t/fancy-llvm-loop-transformation-pass-that-deoptimize-the-code/128100)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 2\
**Last updated:** [April 16, 2025, 11:27am UTC](https://discourse.julialang.org/t/fancy-llvm-loop-transformation-pass-that-deoptimize-the-code/128100 "2025-04-16T11:27:00Z")

</div>

Recently we’ve seen one strange performance regression report, and the following is a MWE we can get: using BenchmarkTools function rand\_n\_1(a,n) r = Vector{UInt}(undef,n) @inbounds for i in 1:n p = a\[1…

---

## [Does the new LLVM SPIR-V backend help Julia in any way?](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307)

<div class="topic-metadata">

**Author:** [@xiaoxi](https://discourse.julialang.org/u/xiaoxi)\
**Replies:** 2\
**Last updated:** [January 28, 2025, 5:42pm UTC](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307 "2025-01-28T17:42:15Z")

</div>

It appears that LLVM 20 will have a SPIR-V backend. Does this new backend help Julia in any way?

---

## [\`llvmcall\` error "llvmcall only supports intrinsic calls" for scalar integer intrinsics on Apple M2](https://discourse.julialang.org/t/llvmcall-error-llvmcall-only-supports-intrinsic-calls-for-scalar-integer-intrinsics-on-apple-m2/125278)

<div class="topic-metadata">

**Author:** [@guille](https://discourse.julialang.org/u/guille)\
**Replies:** 2\
**Last updated:** [January 27, 2025, 8:37pm UTC](https://discourse.julialang.org/t/llvmcall-error-llvmcall-only-supports-intrinsic-calls-for-scalar-integer-intrinsics-on-apple-m2/125278 "2025-01-27T20:37:59Z")

</div>

Hello all! I’m encountering a very strange issue using llvmcall on my Apple M2 Mac with Julia 1.11.3. Hoping someone might have some insights or suggestions. Problem: When I try to use llvmcall to call basic LLVM scal…

---

## [Invalid LLVM IR was generated](https://discourse.julialang.org/t/invalid-llvm-ir-was-generated/123720)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 1\
**Last updated:** [December 11, 2024, 7:00pm UTC](https://discourse.julialang.org/t/invalid-llvm-ir-was-generated/123720 "2024-12-11T19:00:31Z")

</div>

I am trying to understand and debug the issue presented at https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by\_date/2024-12/10/Econometrics.primary.log. Is there a way to test the functionality that NanoSo…

---

## [Revisiting saturating intrinsics](https://discourse.julialang.org/t/revisiting-saturating-intrinsics/112917)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 9\
**Last updated:** [April 25, 2024, 5:15am UTC](https://discourse.julialang.org/t/revisiting-saturating-intrinsics/112917 "2024-04-25T05:15:37Z")

</div>

Hi all. Here is the origin of the discussion I want to have. I had to leave the development a few years ago due to somewhat misfortunes. I apologize for the inconvenience. Unfortunately, no progress has been made in…

---

## [Bit manipulations with llvmcall give strange results](https://discourse.julialang.org/t/bit-manipulations-with-llvmcall-give-strange-results/111403)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 11\
**Last updated:** [March 9, 2024, 10:58pm UTC](https://discourse.julialang.org/t/bit-manipulations-with-llvmcall-give-strange-results/111403 "2024-03-09T22:58:28Z")

</div>

I’m playing around with llvmcall. The following function g is supposed to convert x::UInt8 into an Int8 tuple of length N whose first 8 entries are the bits of x and the higher ones are zero. unvec(t::Tuple{Vararg{VecEl…

---

## [Inferring MethodInstance from code\_llvm](https://discourse.julialang.org/t/inferring-methodinstance-from-code-llvm/110330)

<div class="topic-metadata">

**Author:** [@dyatunin](https://discourse.julialang.org/u/dyatunin)\
**Replies:** 5\
**Last updated:** [February 20, 2024, 3:51am UTC](https://discourse.julialang.org/t/inferring-methodinstance-from-code-llvm/110330 "2024-02-20T03:51:38Z")

</div>

I am trying to track down some performance issues by tracing through the output of code\_llvm. Whenever the LLVM code contains a call to a Julia function, I would like to figure out which MethodInstance of that function i…

---

## [Building Julia with the latest LLVM](https://discourse.julialang.org/t/building-julia-with-the-latest-llvm/109395)

<div class="topic-metadata">

**Author:** [@eymay](https://discourse.julialang.org/u/eymay)\
**Replies:** 3\
**Last updated:** [January 29, 2024, 2:00pm UTC](https://discourse.julialang.org/t/building-julia-with-the-latest-llvm/109395 "2024-01-29T14:00:44Z")

</div>

Hi, I would like to build Julia for ARM and run it on Raspberry Pi 4 in 32 bit mode. I am quite new to Julia and would like to ask if my current config direction is correct. Make.user DEPS\_GIT = llvm USE\_BINARYBUILDER…

---

## [Fastest \`sqrt\` and \`log\` with negative check](https://discourse.julialang.org/t/fastest-sqrt-and-log-with-negative-check/107575)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 17\
**Last updated:** [January 14, 2024, 12:23pm UTC](https://discourse.julialang.org/t/fastest-sqrt-and-log-with-negative-check/107575 "2024-01-14T12:23:15Z")

</div>

NaNMath.jl implements special functions such as sqrt and log which return NaN if called with negative argument. The implementation of sqrt is given by sqrt(x::T) where {T\<:AbstractFloat} = x \< 0.0 ? T(NaN) : Base.sqrt(…

---

## [Is it possible to use autodiff on an external program?](https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 2\
**Last updated:** [January 8, 2024, 2:50am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475 "2024-01-08T02:50:24Z")

</div>

I have a c++ program I am running from julia that acts as the inner loop of a simulation (actually its a game engine). I’ve been playing with lots of derivative free optimizations, and tried the FiniteDiff package which …

---

## [Help with LLVM error "Bad $ operand number in inline asm string"](https://discourse.julialang.org/t/help-with-llvm-error-bad-operand-number-in-inline-asm-string/93080)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [January 17, 2023, 9:33am UTC](https://discourse.julialang.org/t/help-with-llvm-error-bad-operand-number-in-inline-asm-string/93080 "2023-01-17T09:33:19Z")

</div>

At the end of a long code that I’m running on a cluster, I sometimes find the error LLVM ERROR: Bad $ operand number in inline asm string: 'P$��' \[4047386\] signal (6.-6): Aborted in expression starting at none:0 gsigna…

---

## [Using LLVM intrinsic functions inside \`llvmcall\`](https://discourse.julialang.org/t/using-llvm-intrinsic-functions-inside-llvmcall/87955)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 11:16pm UTC](https://discourse.julialang.org/t/using-llvm-intrinsic-functions-inside-llvmcall/87955 "2022-09-28T23:16:19Z")

</div>

I’m playing around with llvmcall. I can use LLVM IR instructions (like add), but I cannot get intrinsic functions (like @llvm.abs.i32) to work. From the post Debugging float SIMD Intrinsics via llvmcall I get the impress…

---

## [I think LLVM can do better here](https://discourse.julialang.org/t/i-think-llvm-can-do-better-here/82213)

<div class="topic-metadata">

**Author:** [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Replies:** 4\
**Last updated:** [June 4, 2022, 6:05pm UTC](https://discourse.julialang.org/t/i-think-llvm-can-do-better-here/82213 "2022-06-04T18:05:01Z")

</div>

This an LLVM question that came up in the process of trying to make min/max faster. In that discussion, this other PR was brought up where @N5N3 suggests the following implementation for min: function \_\_min(x, y) di…

---

## [Julia vs Zig surprise](https://discourse.julialang.org/t/julia-vs-zig-surprise/74540)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 16\
**Last updated:** [January 16, 2022, 4:29pm UTC](https://discourse.julialang.org/t/julia-vs-zig-surprise/74540 "2022-01-16T16:29:38Z")

</div>

Recently ran into two performance comparisons including Julia. THE LINEAR ALGEBRA MAPPING PROBLEM. CURRENT STATE OF LINEAR ALGEBRA LANGUAGES AND LIBRARIES. shows that using BLAS for dense matrix operations, all librar…

---

## ["BOLT Merged Into LLVM To Optimize Binaries For Faster Performance"](https://discourse.julialang.org/t/bolt-merged-into-llvm-to-optimize-binaries-for-faster-performance/74465)

<div class="topic-metadata">

**Author:** [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Replies:** 0\
**Last updated:** [January 12, 2022, 4:20am UTC](https://discourse.julialang.org/t/bolt-merged-into-llvm-to-optimize-binaries-for-faster-performance/74465 "2022-01-12T04:20:03Z")

</div>

11 January 2022 " Facebook for their data center usage of BOLT reports, " For datacenter applications, BOLT achieves up to 7.0% performance speedups on top of profile-guided function reordering and LTO. For the GCC and…

---

## [Why is LLVM missing this constant in a loop?](https://discourse.julialang.org/t/why-is-llvm-missing-this-constant-in-a-loop/72941)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 10\
**Last updated:** [December 11, 2021, 8:16pm UTC](https://discourse.julialang.org/t/why-is-llvm-missing-this-constant-in-a-loop/72941 "2021-12-11T20:16:11Z")

</div>

using BenchmarkTools using LinearAlgebra function f(x,y) z = 0.0 for i in 1:10 xy = x .\* y z += norm(xy) end z end function fopt(x,y) z = 0.0 xy = x .\* y for i in 1:10 …

---

## [SC21: "Comparing Julia to Performance Portable Parallel Programming Models for HPC"](https://discourse.julialang.org/t/sc21-comparing-julia-to-performance-portable-parallel-programming-models-for-hpc/71686)

<div class="topic-metadata">

**Author:** [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Replies:** 2\
**Last updated:** [November 17, 2021, 10:01pm UTC](https://discourse.julialang.org/t/sc21-comparing-julia-to-performance-portable-parallel-programming-models-for-hpc/71686 "2021-11-17T22:01:36Z")

</div>

SCI21 paper: Comparing Julia to Performance Portable Parallel Programming Models for HPC \[pdf\] Index Terms—Julia, OpenMP, OpenCL, Kokkos, CUDA, HIP, Performance Portability, Programming Models, GPUs context: Present…

---

## ["Tensor LLVM Extensions ..." proposal + Julia example in the design document](https://discourse.julialang.org/t/tensor-llvm-extensions-proposal-julia-example-in-the-design-document/71456)

<div class="topic-metadata">

**Author:** [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Replies:** 0\
**Last updated:** [November 14, 2021, 12:41pm UTC](https://discourse.julialang.org/t/tensor-llvm-extensions-proposal-julia-example-in-the-design-document/71456 "2021-11-14T12:41:03Z")

</div>

“Tensor LLVM Extensions Proposed For Targeting AI Accelerators, Emerging Hardware” ( via/context: Tensor LLVM Extensions Proposed For Targeting AI Accelerators, Emerging Hardware - Phoronix 14 November 2021 ) And a …

---

## [Interval Compiler for Sound Float Computations](https://discourse.julialang.org/t/interval-compiler-for-sound-float-computations/69857)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 0\
**Last updated:** [October 15, 2021, 9:38pm UTC](https://discourse.julialang.org/t/interval-compiler-for-sound-float-computations/69857 "2021-10-15T21:38:55Z")

</div>

For those interested in llvm mods for enhancing floats. IGen is a source-to-source compiler for interval arithmetic. IGen takes as input a C function doing floating-point computations, possibly using SIMD intrinsics, a…

---

## [About Julia's inline assembly usage](https://discourse.julialang.org/t/about-julias-inline-assembly-usage/30352)

<div class="topic-metadata">

**Author:** [@Sinai\_Pearl](https://discourse.julialang.org/u/Sinai_Pearl)\
**Replies:** 7\
**Last updated:** [October 12, 2021, 8:06pm UTC](https://discourse.julialang.org/t/about-julias-inline-assembly-usage/30352 "2021-10-12T20:06:02Z")

</div>

I tried to use @asmcall in LLVM.jl. Is there way to copy register’s value to variable in julia code?

[Next page](https://discourse.julialang.org/tag/llvm/72.md?match_all_tags=true&page=1&tags%5B%5D=llvm)
