CT_01_022 - LLVM VL Optimizer Improvements

CT_01_022 - LLVM VL Optimizer Improvements

About

Tracking VL optimizer improvement.

The VL optimizer is MachineIR pass that runs before vsetvli insertion. The pass decreases the VL of vector instructions by looking at the minimum VL of all of the instructions that use its result. This especially important for arithmetic instructions as the loop vectorize does not generate VL predicated arithmetic operations. Naively this produces VLMAX operations. By propagating VL from stores, reductions, etc. we can avoid toggling VL to VLMAX.

Most instructions have been supported already.

Recent important patches in 2H205

https://github.com/llvm/llvm-project/pull/156618

https://github.com/llvm/llvm-project/pull/156719

https://github.com/llvm/llvm-project/pull/155467

https://github.com/llvm/llvm-project/pull/151285

Stakeholders/Partners

RISE:

Min Hsu, SiFive

External:

Luke Lau, Igalia

Dependencies

 

Status

Development

In PROGRESS

 

Development Timeline

NA

 

Upstreaming

IN PROGESS

 

Upstream Version

 

 

 

 

Contacts

@Craig Topper

 

 

Dependencies

 

 

 

Updates

Sep 19, 2025

  • Page created