Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Oct 20, 2025

Link: llvm/llvm-project#163021
Requested by: @fhahn

@github-actions github-actions bot mentioned this pull request Oct 20, 2025
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Oct 20, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@7b0c51a
patch: llvm/llvm-project#163021
sha256: de0ac9bf7623aa9f2f5b16ee6851cc3bdc904b824177675e953934a38f50faab
commit: 93cba0e

13 files changed, 4635 insertions(+), 4713 deletions(-)

Improvements:
Regressions:
  libcalls-shrinkwrap.NumWrappedTwoCond 166 -> 50 -69.88%
  libcalls-shrinkwrap.NumWrappedOneCond 137 -> 113 -17.52%
  openmp-opt.NumOpenMPRuntimeCallsDeduplicated 1080 -> 936 -13.33%
  abstract-call-sites.NumInvalidAbstractCallSitesUnknownCallee 809 -> 747 -7.66%
  simplifycfg.NumBitMaps 2236 -> 2126 -4.92%
  memdep.NumCacheDirtyNonLocal 293 -> 280 -4.44%
  div-rem-pairs.NumHoisted 3241 -> 3122 -3.67%
  attributor.NumAAs 3947046 -> 3824292 -3.11%
  instcombine.NumSel 32488 -> 31550 -2.89%
  memdep.NumCacheNonLocal 19737 -> 19297 -2.23%

https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/linux/original/pcm_native.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/linux/original/regmap.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/postgres/original/regexec.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/gromacs/original/pme_grid.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/gromacs/original/colvarbias_meta.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/LegalizerHelper.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/InstCombineSimplifyDemanded.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/Instructions.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/X86FixupVectorConstants.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/DAGCombiner.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/InterleavedLoadCombinePass.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/LoadStoreOpt.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/Legalizer.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/InstCombineVectorOps.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/NaryReassociate.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llvm/original/CombinerHelper.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/raylib/original/raudio.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/ffmpeg/original/vf_showinfo.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/ffmpeg/original/vaapi_encode.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/ffmpeg/original/vf_addroi.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/ffmpeg/original/cbs_h2645.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/wolfssl/original/kdf.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/wireshark/original/packet-hsms.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/miniaudio/original/unity.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/pbrt-v4/original/paramdict.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/wasmtime-rs/original/16qf4j2oevjc61uc.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/wasmtime-rs/original/1f5p54q9915bq6gz.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/openssl/original/krb5kdf.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/openssl/original/ssl_lib.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/abc/original/bblif.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/pola-rs/original/e5h141x44lxp1jgda4wn9g2mb.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/pola-rs/original/8sc0ky4ceo440v2ray4donw55.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/pola-rs/original/5eb1qorc93yw2vdp0woub3vux.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llama.cpp/original/llama-quant.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/llama.cpp/original/ggml-quants.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/typst-rs/original/59tuvc5m3xlovl3o.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/minetest/original/craftdef.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/soc-simulator/original/sim_mycpu.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/mitsuba3/original/integrator.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/hwloc/original/topology-synthetic.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/hwloc/original/distances.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/z3/original/dioph_eq.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/z3/original/sls_arith_lookahead.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/spike/original/vs8r_v.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/spike/original/vs2r_v.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/spike/original/vs4r_v.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/spike/original/vs1r_v.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/faiss/original/ProductAdditiveQuantizer.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/eastl/original/BenchmarkAlgorithm.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/faiss/original/IndexIVFPQ.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/proxygen/original/RendezvousHash.ll fail
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/main/bench/opencv/original/persistence.ll fail

+5 quantlib/simplex.ll
+1 z3/sls_seq_plugin.ll
+0 php/ir_cfg.ll
-4 duckdb/ub_duckdb_storage_compression.ll

@github-actions
Copy link
Contributor

This patch modifies several LLVM IR files across different benchmarks, primarily focusing on loop exit conditions and the use of llvm.umax intrinsics for safe minimum trip count enforcement. The key changes are:

  1. Elimination of redundant llvm.umax call in duckdb benchmark:
    In ub_duckdb_storage_compression.ll, the .us.i loop previously used %umax.i = call @llvm.umax.i64(%11, 1) to ensure a minimum loop bound. This is replaced with a direct comparison against %11, while the PHI nodes in the preheader are adjusted to merge values from both entry paths. This suggests the safety of using %11 directly was proven, eliminating an unnecessary intrinsic call.

  2. Safer loop bounds using llvm.umax in quantlib benchmark:
    In simplex.ll, a new @llvm.umax.i64(%add, 2) call is introduced to compute a loop trip count, replacing a previous use of %28. The loop exit condition now compares %inc150 against this umax value, ensuring the loop runs at least twice. This enforces a minimum iteration count, likely to satisfy correctness or optimization assumptions.

  3. Introduction of llvm.umax declaration:
    The simplex.ll file adds a declaration for declare i64 @llvm.umax.i64(i64, i64), along with appropriate attributes (nocallback, nounwind, speculatable, etc.), indicating that this intrinsic is now explicitly used and relied upon for correctness.

  4. Fixing loop bounds in z3 benchmark:
    In sls_seq_plugin.ll, the exit condition %exitcond81 is updated to compare against %wide.trip.count82 (a zext of %11) instead of %wide.trip.count, which may have been incorrectly widened earlier. This ensures the loop uses the correct trip count derived from the input size.

  5. Phi node predecessor fix in z3 benchmark:
    A PHI node in label 229 is corrected to reference %.thread552 instead of %.thread551, fixing a likely typo or misrouting in control flow merging.

Overall, the changes improve correctness and optimization safety by properly enforcing minimum loop iterations via llvm.umax, correcting trip count usage, and fixing control flow dependencies. These modifications suggest improved analysis or transformation in the optimizer related to loop canonicalization and bounds reasoning.

model: qwen-plus-latest
CompletionUsage(completion_tokens=529, prompt_tokens=3640, total_tokens=4169, completion_tokens_details=None, prompt_tokens_details=None)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants