CT_01_011 - Improve if-conversion, particularly for x264 quant4x4 (LLVM)
About
During 2023 various RISE and non-RISE members worked to improve if-conversion for GCC. One of the recent discoveries from that work is that it allows if-conversion of a scalar copy of quant_4x4 within the spec2017 benchmark suite. We have seen this improve the performance of the first (of three) steps in the x264 benchmark by approximately 10%. The improvement is believed to be primarily due to eliminating a poorly predicted branch in that hot loop.
This work item for LLVM is meant to track a corresponding improvement to LLVM's if-conversion. While this effort primarily helps the scalar quant_4x4, the belief is that it will help a variety of other codes, just in much smaller ways.
Stakeholders/Partners
RISE:
Ventana: Jeff Law, Mikhail Gudim
External:
Dependencies
Status
Development | COMPLETE |
|
|---|---|---|
Development Timeline | NA |
|
Upstreaming | NOT STARTED |
|
Upstream Version |
|
|
Contacts | Jeff Law (Ventana) |
|
Dependencies |
|
|
Updates
Sep 19, 2025
Moved to 2H2025
Feb 12, 2025
Moved to 1H2025
Jul 11, 2024
Moved to 2H2024
Jun 5, 2024
Development work is considered done. Needs to be tested on design to validate improvement though.
Apr 25, 2024
Failure to convert test into an equality test continues to be a problem
Craig thinks that's supposed to already work, so clearly needs deeper dive
Heuristic to avoid if-converting when some operands are invariant seems reasonable, but implementation seems bogus
Enablement of early if-conversion
Misha or another Ventana engineer will pick this up.
Mar 27, 2024
Patch under internal review. Key issues appear to be:
Need to enable early if-conversion by default
Wire up additional ways to generate czero
Still working through decision whether or not to if-convert
Mar 13, 2024
Project noted as priority for 20241H