Office Hours Agenda Items
Feel free to drop in any agenda items for the monthly office hours.
April 2026
Did anyone nominate for chair of this group?
JL – my understanding is Peter Bergner has self-nominated to lead this group for the next year.
Update on LLVM buildbots: we have enough funding from RISE to run them until December
March 2026
2026-1H Priorities still need cleanup.
FYI, returning a small struct or vector less than XLen bits on clang generates unnecessary zero extend to zero the upper bits of a0.
Philip Reames update on RFP21, vectorizer contract with Igalia for LLVM. Was not discussed at board meeting on Feb 12. There will be an email board vote, no firm ETA.
gcc and LLVM CI on build farm. Mainly ran by Rivos. Looking for volunteers to step up to maintain this infrastructure. If not volunteers, will probably plan to shut down. If you know anyone who is interested send to Developer Infrastructure Group. LLVM fuzzer also needs volunteers to triage.
Philip will get dates of when contracts will expire.
LLVM fuzzer reporting may have stopped in November. Is this machine still running? Philip will get summary.
Craig asked if anyone is interested in P extension.
32-bit vectors on RV32 and 64-bit vectors on RV64 can codegen without crashing LLVM.
Intrinsic wrapper over inline assembly created.
Paul mentioned RISE may be starting a baremetal group that might be more interested in P.
Chip asked about OpenBLAS patch blocking GEMM. Maintainer pushing back as being too intrusive due to repacking data for cache. Seems to help for super large sizes, but not smaller sizes. Patch listed as being from RISE. Is it from AI/ML? Min says there is an ongoing effort, but he didn’t know the details.
gcc 1.7x slower than llvm on one GEMM kernel. LMUL=1. Measured on BananaPi.
February 2026
Need a new chair for this group.
Is this a good meeting time? Would we get more participation from Asia at a different time?
Need to create 2026-1H Priorities
llvm.clmul intrinsic introduced, with generic lowering: https://github.com/llvm/llvm-project/pull/168731 – Craig is working on RV-specific follow-ups
Proposal to make zvknha a subset of zvknhb: https://github.com/llvm/llvm-project/pull/178680
isa-manual PR https://github.com/riscv/riscv-isa-manual/pull/2635
There’s a similar issue with Zbc/Zbkc. https://github.com/riscv/riscv-isa-manual/issues/2523
Proposal to lower blends earlier in VPlan: https://github.com/llvm/llvm-project/pull/171851
llvm.vector.splice.{left,right} work ongoing: https://github.com/llvm/llvm-project/pull/179219
GCC performs over 50% better than LLVM on hmmer SPEC2006INT. To prioritize speculative task of enabling LDist by default?
Hmmer is known to require last iteration peeling and loop distribute. https://groups.google.com/g/llvm-dev/c/jXrYmjjPhNE/m/xePYf7drBgAJ
GCC performs 30% better than LLVM on xalancbmk SPEC2006INT. To investigate.
RP21 https://lists.riseproject.dev/g/RISE-Compilers-and-Toolchains-WG/message/118
January 2026
Need a new chair for this group.
December 2025
Open: building whole system with vl=512 for TT Blackhole
LLD issue: https://github.com/llvm/llvm-project/issues/168308
LLVM is about to make Spacemit X60 as default scheduling model: https://github.com/llvm/llvm-project/pull/167008
Rationale: this is better than no scheduling model, though will cause performance changes on (lots of) code that doesn’t set mcpu/mtune
X60 was selected as a common implementation, intent is to have a generic scheduling model at some point; X60 tuning currently produces decent results on a variety of implementations
LLVM is adding a new mtune syntax: https://github.com/llvm/llvm-project/pull/168160
Works as “base scheduling model + modifiers”, Arm has something similar in principle, thought RISC-V syntax is simpler
Discussing to standardize across both compilers: https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/122
RVI proposal for software optimization features: https://riscv.atlassian.net/wiki/spaces/TOXX/pages/585400366/Optimization+Directives+Fast+Track+Approval+Request
There's overlap with tune features, which we should raise as a feedback (Min)
Maybe revisit next moth
AVL vs LMUL in the optimization guide: should it have a different cases for statically known vs dynamic AVL?
Return to at later point
November 2025:
NASA HPSC and compilers
October 2025:
https://lf-rise.atlassian.net/wiki/spaces/HOME/pages/8591091
Jeff suggests to close it, upstreaming never started
Min Hsu is looking at if-conversion and is interested to understand the example better, particularly how it aligns with scheduling model.
Potential follow up to https://lf-rise.atlassian.net/wiki/spaces/HOME/pages/8589463/CT_01_007+-+CRC+Optimization+LLVM?focusedCommentId=699793418 - add CLMUL intrinsic and produce CLMUL instruction for CRC/GHASH
Craig: Zbc is not part of any profile, vector version is in Zvbc (64-bit), Zvbc32e is not yet ratified - question about available implementations
LLVM loop distribute, https://lf-rise.atlassian.net/wiki/spaces/HOME/pages/8589463/CT_01_007+-+CRC+Optimization+LLVM?focusedCommentId=699367428
Philip: potential item is follow up to non-trivial rematerialization in LLVM (Luke Lau just finished a change)
LLVM shrink wrapping
MIR changes landed for Mikhail patch
Philip: long term register allocation driven solution might be better approach, but likely would require a change to reg allocator core logic
Petr: there is a fix to benchmark miscompiles in Mikhail’s repo
Philip: Using register scavenger for shrink-wrapping is not a good idea, we likely need to address that eventually
Philip: LLVM register scavenger doesn’t yet support remobilization, but it would be very easy to add if there is a motivating example
LLVM: addressing spilling for stack frames that don’t fit into 12 bits of address
cactuBSSN in SPEC is affected
Philip: that creates catastrophically bad spill code
Jeff: GCC has a hook for reloading a memory address
Philip is interested in looking further into it
glibc patch for string and memory functions to use generic RVV VLA is in review
A few people are interested in converting Neon code to RVV, maybe a work item for 2026
September 2025:
Originally planned HPSC (see October), but logistics didn’t work out.
Philip Reames: LLVM EVL vectorization enabled by default. Ramping down on open items. Call for opportunities for improvement preferably with impacted workload.
Peter Bergner added static trampoline support for RV32 and RV64 to libffi. Gets rid of executable stack. Merged upstream, not in a release yet.
Philip Reames asked about vectorized versions of mem* functions in glibc. These were proposed several years ago and are still not merged.
Ruinland asked if anyone had tried Qualcomm’s eld linker.
August 2025:
LLVM vectorizer plan
EVL vectorization would be enabled by default, patch landing soon
Todo: segmented loads and stores in vectorizer (backend can produce it)
WIP: strided load support, non ^2 length support - cost model, non-1 element stride
WIP: SLP vectorizer: non ^2 support, loop-aware cost model, copyable elements
Support of uncountable loops, fault-first-only loads
Support division using vp intrinsics
Multiply reduce with scalable vectors (currently uses fixed)
Worth noting fault first loads RFC: https://github.com/llvm/llvm-project/pull/151300
LLVM backend
Fault first only loads: https://github.com/llvm/llvm-project/pull/128593
GCC
VLS vectorization generates unnecessary spills - WIP
Improvements to zero-stride support
Vineet went over https://lf-rise.atlassian.net/wiki/spaces/HOME/pages/597196813
Items moving to 2H - for LLVM Craig and Petr to take that offline, Jeff is out this time
Other updates
GDB has proposed vector register support
Peter Bergner is adding static trampoline support to libffi, needs to test it in 32-bit environment
May 2025:
Peter Berger joined the WG via Tenstorrent
GCC notes (Vineet, Jeff Law is out)
Spacemit X60 cost model
FRM save-restore, first set of patches posted
LLVM notes
CT_01_012 - Improve shrink-wrapping (LLVM), Petr Penzin to join the review effort
Igalia landed Spacemit X60 model, with significant performance improvements
Vectorizer indvar changes, EVL vectorization WIP (somewhat slow), tail folding, zvqdot
Craig Topper is working on load-store pairs for RV32 - WIP for fp64, can be done for structs, needs more cost model
Exposure to more software
BPI dev Gentoo images - official landing page would be a good idea
Exploring a distro build with LLVM
Rust ecosystem still has some hiccups with cross builds
Android and Fuchsia are WIP, there is a LLD linker bug exposed by Android builds which we don’t yet have a line of sight on fixing
Apr 2025:
Petr Penzin taking over as WG lead! Thanks as ton for stepping in
Petr’s decision on meeting time and such going forward
Obviously I’ll provide whatever support I can to Petr
RP006/RP006A Extension
Not surprisingly Igalia is doing fine work, so we’d like to keep them engaged
Also provides ongoing resources to LLVM builders/CI system they’ve set up
Seems like we should take direction from Philip, Craig, etc. If they want it to renew, then I’m supportive
Do we want to expand any areas? For example, transition from icount testing to BPI performance testing?
Need to update project pages for both LLVM and GCC. We’re halfway through 1H2025!
Starting to ponder if we’re going to have a RISC-V GCC coordination branch again this year
It’s certainly proven useful, though we don’t have as many big ticket items landing now
But we have lots of smaller stuff
It’s a fair amount of work
Will discuss in patchwork meeting tomorrow AM
GCC notes
Synopsys fusion work looks good from a static standpoint, but hasn’t been performing well on design
Could well be a design problem our fusion support or misunderstanding of docs
It’d probably be useful to run this on silicon, but we don’t have fusion info on the SpacemiT chip. I’ve reached out to SpacemiT, but haven’t heard back
Lower priority task going forward
mvconst_internal removal
Basic idea is to hook the logical expanders and generate more sensible code there
Will likely need some bridge patterns to deal with combine limitations
Will also likely need to improve support for REG_EQUAL notes in combine
POC to prove viability. So far nothing screaming “this won’t work”
LLVM notes
Mar 2025:
Elections coming up. Would love to see someone else step into the leadership role. Obviously I’d still be around to help, but with transition and with info on what’s going on in the GCC space in general and what Ventana’s doing across both toolchains.
RFP Status. I haven’t had the time to follow-up on any of this stuff. Not ideal obviously. This week is unlikely to be any different than the last several
llvm-20 release in flight (RC stage). We probably should get together RISC-V highlights for the wider audiences. Any RISC-V specific concerns that need to be addressed?
gcc-15 release in flight (regression bugfixing, ETA May). No major concerns, though we do have some smaller fixes that need to get wrapped up. Mass Fedora builds just starting up, so wouldn’t be surprised to see issues start showing up shortly
Stuff on the radar for GCC post gcc-15
Synopsys fusion work looks interesting
Discussed in GCC RISC-V Coordination meeting last week.
Looking at notable changes in extension removal that might really help our ability to utilize Zbs better. Under investigation
Key issue is we have sign extensions in the RTL for various ops. Largely due to how we deal with sub-word access in GCC.
That sign extension makes more bits appear live than we really care about from a source standpoint
Thinking we might be able to use ext-dce to convert those extensions to subregs, much like we do simple sign extensions.
May require a lot more patterns
Perhaps push the subreg into the operands
Conditional move improvements
Use standard API to extend comparison operands allowing more cases as a result.
Use standard approaches for partial word destinations (store into full word temporary and narrowing subreg to final dest)
Feb 2025:
Updated GCC pages for 1H2025
Obviously feel free to add more stuff
Need similar effort for LLVM pages
Fortran in LLVM needs a page
Update on glibc mem*, str* work
Update on x264 findings
Project plans going forward (new election in the spring, who wants to step up?)
Dec 2024:
vmvXr situation
GCC is just treating this as a bug and has already been fixed
Codegen impacts are expected to be trivial, requires vector regs to be live across calls to trigger which doesn't happen with the default ABI.
LLVM is still deciding what to do
May also be clarified at the ABI level
gcc-15 development window closed
Most of Robin & my work has been submitted and is working it way through reviews
Mariam (RAU)'s CRC work had been submitted well in advance, bulk of work is in
LLVM
Separate shrink wrapping integrated upstream
Stack clash protection being updated in response to Craig's feedback
glibc:
I still need to start pushing the mem* and str* patches
BPI quirks
Process hangs have been seen by others (golang project in particular), it's been reported and is in both the golang bug tracker and a spacemit tracker
Rebuilt kernel (6.6.XX) with a modern GCC (Ventana's internal release, so gcc-14 + improvements) and I haven't seen a hang since!
Nov 2024:
What to do about the vmvXr situation
Does it depend on vtype or not?
If it does, then that implies we'll need a vsetvl at the start of each function with vector code
Unclear at this point
GCC 15 development window closing rapidly, will transition into bugfixing mode in ~2wks
Key is that any new development must be posted for review by the deadline (Nov 17 IIRC)
Robin and I have various internal patches to submit, mostly around vector performance for x264
Patches already submitted have already met the deadline and are thus eligible for inclusion even if they're going through revisions
Nov & December will be "general bugfixing", so any bug in bugzilla is eligible for fixing, though we reserve the right to reject things that are too risky or gaming the system
Sometime in Jan we transition to regression fixes only
LLVM
Misha's separate shrinking wrapping posted upstream for review (I think). Should notably help 500.perlbench and 502.gcc
Stack clash work is done, but engineer is engaged on other stuff right now
Notable work that should be landing shortly
ifunc'd mem* and str*. Andreas S. ACK'd memset with a minor fix, so I'll be submitting the rest shortly
Based on work from SiFive and Rivos engineers
My involvement is just the ifunc wiring
CRC optimization needs minor fixes
One chunk of generic code is goofy and apparently causes regressions for risc-v when fixed
Looks like we need a way to check for zbkb dynamically in dejagnu harness. Probably zbc as well
Function multi-versioning for GCC
Various minor changes to improve vector codegen, scheduling, etc.
PSAs. BPI F3 in my tester, bootstrap & regression test every 2-3 days
Right now it's always the same config, but considering alternating -march switch testing to broaden coverage (zvl)
Experiencing process hangs, which look like kernel issues
Aug 2024:
Reminder of GCC patch coordination meeting every Tuesday (2:30pm UTC)
GNU Cauldron Prague (Sept 14-16)
RV Summit NA in Oct
RFP009 is out for bidding (LLVM performance investigation)
Stack Clash (GCC & LLVM)
CRC Work (GCC)
VRULL's work on narrow store feeding wider load
July 2024:
RFP008
2H2024 projects – especially LLVM
GCC Coordination Branch Discussion
Keeping RISC-V backend in sync with trunk
Limited cherry-picking of generic code (when it's known to help RISC-V in meaningful ways)
Question we'll be discussing in patchwork meeting – late-combine changes, to include or not
June 2024:
Unaligned vector loads/stores status
Constant Synthesis revamp. Largely done for GCC. Need to see if there's any significant cases for LLVM after Craig's recent fixes
Shrink Wrapping for LLVM
Misha is diving into the EH issues and xz performance regression
Stack clash, later than expected, but still moving forward
LLVM – Major development appears to be done. Porting testcases from other archs to rv64 did expose one problem that Raphael is diving into now
GCC – Going through internal review now
RFP008 – Will go through review this week
Flang – need a project page for LLVM. Do we want to propose this as a contractor project?
May 2024:
Jeff Law: Introduction
Jeff Law: Constant Synthesis (both compilers)
Jeff to get Craig examples of commonly missed cases (bseti, only consistently weak idiom for LLVM)
GCC needs much more work (bseti, shNadd, "uw" forms, duplicated high/low)
Both compilers probably need better support for pack)
Concerns about overall structure of code, but may be inherent in the problem
Jeff Law: Shrink Wrapping (LLVM)
Just looking for high level sanity check right now
Doesn't work with EH, but that's got to be an implementation detail, get the CFI notes right and it should work
Interactions with push/pop?
How many new code paths are showing up? Is the code getting harder to reason about?
Jeff Law: Stack clash status (both compilers)
External review probably 1-2 weeks out
Testing with scanner to find vulnerable binaries, then test after rebuilding with new compiler
RFP008
New language. Jeff to review & comment
Launch LLVM equivalent RFP (ADLR?)
ADLR & Jeff to circle back with Baylibre folks WRT LTO (they think it doesn't work)
IFUNCS. How to handle case where kernel claims V, but it's actually V0.7?
We can't control where the kernel for these SBCs come from
We should expect those kernels to occasionally mis-represent the hardware
Make glibc, gcc & llvm ifunc resolvers be reasonably defensive for these cases
Avoid crashing user code in these scenarios, bad user experience
Fallback to sensible default when the syscall isn't available
Frame pointers vs Zcmp – ABI implications and desire to unwind without CFI tables
Known issue at the RVI level
Distros (Fedora, Canonical, etc) likely aren't going to care. ABI for them is set, and they're likely rv64 only
Would like to see ABI or extension fixed, but if that's not possible, they may do a vector extension.
Flang
new vs old flang
General need to fix flang to be cross-buildable – contractor proposall
LLVM Testing proposal
Desire to add another configuration, who is the coordination point for this contract?
Expectation is cost delta should be small (initial bring-up and ongoing resources)