Skip to content

pre-commit: PR136665 #2294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

pre-commit: PR136665 #2294

wants to merge 3 commits into from

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Apr 22, 2025

Link: llvm/llvm-project#136665
Requested by: @dtcxzyw

@github-actions github-actions bot mentioned this pull request Apr 22, 2025
@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Apr 22, 2025

Diff mode

runner: ariselab-64c-v2
baseline: llvm/llvm-project@a095ebc
patch: llvm/llvm-project#136665
sha256: bd76bb516767d0f58c1eb490bdb8ca41fedec474c3da4c21a3bc1ac9948689fb
commit: 42043d9

408 files changed, 318443 insertions(+), 320286 deletions(-)

Improvements:
  correlated-value-propagation.NumSMinMax 5107 -> 5739 +12.38%
  indvars.NumElimIdentity 1689 -> 1692 +0.18%
  globalopt.NumDeleted 853752 -> 853850 +0.01%
  instcombine.NegatorNumValuesVisited 19828477 -> 19829904 +0.01%
  instcombine.NumDeadInst 35305287 -> 35307319 +0.01%
  instcombine.NegatorTotalNegationsAttempted 19075294 -> 19076232 +0.00%
  indvars.NumElimCmp 52103 -> 52105 +0.00%
  globalsmodref-aa.NumNoMemFunctions 661806 -> 661825 +0.00%
  globalsmodref-aa.NumReadMemFunctions 1025542 -> 1025561 +0.00%
  instcombine.NumCombined 105572850 -> 105574650 +0.00%
Regressions:
  correlated-value-propagation.NumMinMax 13358 -> 13313 -0.34%
  globaldce.NumVFuncs 8178 -> 8173 -0.06%
  simple-loop-unswitch.NumBranches 88679 -> 88643 -0.04%
  indvars.NumWidened 214062 -> 214026 -0.02%
  indvars.NumElimIV 217219 -> 217183 -0.02%
  indvars.NumElimExt 258994 -> 258958 -0.01%
  indvars.NumLFTR 270806 -> 270770 -0.01%
  simplifycfg.NumHoistCommonCode 603974 -> 603902 -0.01%
  correlated-value-propagation.NumSDivs 17002 -> 17001 -0.01%
  globaldce.NumVariables 87253 -> 87248 -0.01%

2 2 bench/abc/optimized/giaSif.ll
8 8 bench/abc/optimized/giaUtil.ll
13 13 bench/abc/optimized/rsbDec6.ll
10 10 bench/assimp/optimized/FBXBinaryTokenizer.ll
8 8 bench/assimp/optimized/FBXTokenizer.ll
18 18 bench/box2d/optimized/imgui_draw.ll
16 16 bench/box2d/optimized/imgui_widgets.ll
12 12 bench/brotli/optimized/cluster.ll
7 4 bench/bullet3/optimized/btMultiSphereShape.ll
102 99 bench/ceres/optimized/manifold.ll
111 111 bench/ceres/optimized/schur_complement_solver.ll
25 25 bench/cmake/optimized/nghttp2_session.ll
54 54 bench/cpython/optimized/socketmodule.ll
2 5 bench/darktable/optimized/decoders_libraw.ll
15 14 bench/darktable/optimized/identify.ll
6 9 bench/darktable/optimized/load_mfbacks.ll
7 7 bench/faiss/optimized/AdditiveQuantizer.ll
8 8 bench/folly/optimized/Format.ll
4 4 bench/freetype/optimized/sdf.ll
70 70 bench/g2o/optimized/edge_se2_lotsofxy.ll
49 49 bench/g2o/optimized/edge_se3_calib.ll
17 17 bench/glslang/optimized/ParseContextBase.ll
13 13 bench/gromacs/optimized/xtc2.ll
6 6 bench/grpc/optimized/compression_internal.ll
8 8 bench/grpc/optimized/flow_control.ll
5 5 bench/grpc/optimized/work_stealing_thread_pool.ll
13 13 bench/hermes/optimized/zip.ll
3 3 bench/hyperscan/optimized/ng_uncalc_components.ll
15 12 bench/icu/optimized/csrucode.ll
26 26 bench/image-rs/optimized/254ue5dpb10tdnze.ll
4 4 bench/libquic/optimized/quic_sent_packet_manager.ll
14 14 bench/libwebp/optimized/extras.ll
23 17 bench/libwebp/optimized/frame_dec.ll
20 20 bench/libwebp/optimized/quant_enc.ll
12 8 bench/linux/optimized/ntp.ll
158 155 bench/llama.cpp/optimized/ggml-quants.ll
1 1 bench/lodepng/optimized/pngdetail.ll
16 16 bench/luajit/optimized/lj_trace.ll
12 12 bench/luau/optimized/isocline.ll
2 5 bench/lvgl/optimized/lv_anim.ll
5 2 bench/lvgl/optimized/lv_roller.ll
2 2 bench/meshlab/optimized/filter_mesh_booleans.ll
31 35 bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll
73 73 bench/miniaudio/optimized/unity.ll
5 5 bench/mold/optimized/passes.cc.X86_64.ll
56 56 bench/nuklear/optimized/unity.ll
11 8 bench/opencv/optimized/fast_gemm.ll
18 18 bench/opencv/optimized/ts_func.ll
42 42 bench/openexr/optimized/ImfLut.ll
46 46 bench/openexr/optimized/ImfRgbaFile.ll
9 9 bench/openjdk/optimized/cmsopt.ll
34 37 bench/openjdk/optimized/compilerDefinitions.ll
2 8 bench/openjdk/optimized/p11_convert.ll
63 63 bench/openssl/optimized/cipher_aes_gcm_siv_hw.ll
4 10 bench/openssl/optimized/drbg_ctr.ll
66 68 bench/openusd/optimized/reformat.ll
25 22 bench/openusd/optimized/warped_motion.ll
20 19 bench/openusd/optimized/write.ll
10 7 bench/pbrt-v4/optimized/parallel.ll
3 3 bench/qdrant-rs/optimized/23nlkzsh9fgdn4zq.ll
12 12 bench/quantlib/optimized/generalizedhullwhite.ll
7 7 bench/quickjs/optimized/quickjs.ll
12 12 bench/raylib/optimized/rcore.ll
6 6 bench/raylib/optimized/rtextures.ll
15 15 bench/recastnavigation/optimized/DetourNavMeshBuilder.ll
5 2 bench/recastnavigation/optimized/RecastRasterization.ll
6 3 bench/redis/optimized/cluster_legacy.ll
40 40 bench/redis/optimized/server.ll
5 5 bench/rocksdb/optimized/filter_policy.ll
4 4 bench/ruby/optimized/io.ll
9 6 bench/stb/optimized/stb_image_write.ll
21 21 bench/stockfish/optimized/evaluate_nnue.ll
2 2 bench/typst-rs/optimized/4qskctz4kwc33g7b.ll
3 6 bench/typst-rs/optimized/d6l9ieo9tcw33dn.ll
31 31 bench/wireshark/optimized/packet-h265.ll
0 4 bench/wolfssl/optimized/internal.ll
8 8 bench/xgboost/optimized/extmem_quantile_dmatrix.ll
5 5 bench/zstd/optimized/zstd_ldm.ll

Copy link
Contributor

Based on the provided diff, here is a summary of up to 5 major changes across various LLVM IR files:

  1. Reordering and Replacement of llvm.smin and llvm.smax Calls:

    • In multiple files (e.g., giaSif.ll, rsbDec6.ll, imgui_draw.ll), the order of llvm.smin and llvm.smax calls has been swapped. For example, llvm.smin followed by llvm.smax is now replaced with llvm.smax followed by llvm.umin. This change likely optimizes the range clamping logic for signed integers.
  2. Introduction of llvm.umax and llvm.umin Intrinsics:

    • New intrinsics llvm.umax and llvm.umin have been introduced in several files (e.g., FBXBinaryTokenizer.ll, ntp.ll, compression_internal.ll). These are used for unsigned integer clamping, replacing previous uses of llvm.smin and llvm.smax. This ensures more precise handling of unsigned values.
  3. Phi Node Updates:

    • Phi nodes in several files (e.g., identify.ll, flow_control.ll) have been updated to reflect new predecessors or operands. For instance, %indvars.iv.next is replaced with %indvars.iv.next.i, indicating adjustments to loop iteration variables or control flow labels.
  4. Removal of llvm.smin Declarations:

    • In some files (e.g., decoders_libraw.ll, lvgl/optimized/lv_anim.ll), declarations for llvm.smin have been removed, while new declarations for llvm.usub.sat and llvm.umin have been added. This suggests a shift toward using more specialized intrinsics for specific operations.
  5. Truncation Adjustments:

    • Truncation instructions in files like quant_enc.ll and luajit/optimized/lj_trace.ll have been updated to use trunc nuw nsw instead of just trunc. This ensures that truncations preserve numerical properties (nuw = no unsigned wrap, nsw = no signed wrap), improving safety and correctness for certain operations.

These changes collectively aim to improve the precision, safety, and performance of integer clamping and arithmetic operations in the LLVM IR, likely resulting from updates to optimization passes or intrinsic handling in the compiler. The introduction of llvm.umax and llvm.umin intrinsics for unsigned values, along with the reordering of smin and smax calls, reflects a more systematic approach to range clamping. Additionally, updates to phi nodes and truncation instructions refine control flow and data handling.

model: qwen-plus-latest
CompletionUsage(completion_tokens=580, prompt_tokens=118003, total_tokens=118583, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Apr 22, 2025
@dtcxzyw dtcxzyw deleted the test-run14594681370 branch May 18, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant