Skip to content

Conversation

zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Jul 29, 2025

Link: llvm/llvm-project#151115
Requested by: @nikic

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

zyw-bot commented Jul 29, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@76bebb5
patch: llvm/llvm-project#151115
sha256: 96c66d477055f99c918dee1a14666b6bc925490e4e834887b33b458248f63c24
commit: 67e575b

1493 files changed, 860718 insertions(+), 859642 deletions(-)

Improvements:
  tailcallelim.NumAccumAdded 152 -> 156 +2.63%
  instcombine.NegatorNumNegationsFoundInCache 4467 -> 4472 +0.11%
  simple-loop-unswitch.NumSwitches 1851 -> 1852 +0.05%
  instcombine.NegatorMaxDepthVisited 20668 -> 20678 +0.05%
  tailcallelim.NumEliminated 9298 -> 9302 +0.04%
  tailcallelim.NumRetDuped 16581 -> 16585 +0.02%
  instcombine.NegatorMaxTotalValuesVisited 64691 -> 64706 +0.02%
  instcombine.NegatorNumTreesNegated 51893 -> 51903 +0.02%
  instcombine.NegatorNumInstructionsNegatedSuccess 63736 -> 63748 +0.02%
  correlated-value-propagation.NumNNeg 105077 -> 105096 +0.02%
Regressions:
  correlated-value-propagation.NumMinMax 12466 -> 12446 -0.16%
  move-auto-init.NumMoved 2634 -> 2632 -0.08%
  simplifycfg.NumLookupTablesHoles 2552 -> 2551 -0.04%
  licm.NumMovedCalls 34912 -> 34903 -0.03%
  loop-simplifycfg.NumLoopExitsDeleted 3905 -> 3904 -0.03%
  memdep.NumUncacheNonLocal 27302 -> 27296 -0.02%
  correlated-value-propagation.NumShlNUW 163239 -> 163204 -0.02%
  simplifycfg.NumSpeculations 412794 -> 412710 -0.02%
  simplifycfg.NumLookupTables 22897 -> 22893 -0.02%
  loop-instsimplify.NumSimplified 182221 -> 182190 -0.02%

7 4 bench/abc/optimized/abcUtil.ll
6 10 bench/abc/optimized/cbaNtk.ll
77 74 bench/abseil-cpp/optimized/crc.ll
5 9 bench/abseil-cpp/optimized/nonsecure_base_test.ll
28 24 bench/arrow/optimized/arena.ll
15 9 bench/assimp/optimized/Exporter.ll
2 3 bench/assimp/optimized/IFCOpenings.ll
11 8 bench/assimp/optimized/SpatialSort.ll
8 5 bench/boost/optimized/alloc_lib.ll
16 18 bench/boost/optimized/async.ll
7 3 bench/boost/optimized/lock_pool.ll
64 61 bench/box2d/optimized/shape.ll
9 6 bench/bullet3/optimized/btSoftBodyHelpers.ll
10 12 bench/c3c/optimized/float.ll
5 9 bench/clap-rs/optimized/3b4nqkxyl1xqdcre.ll
12 20 bench/clap-rs/optimized/ms9r2ilwmkwzn0d.ll
32 31 bench/cmake/optimized/cmCTestMultiProcessHandler.ll
23 21 bench/cmake/optimized/cmQtAutoGen.ll
8 4 bench/cmake/optimized/io.ll
61 73 bench/coreutils-rs/optimized/5e48q1wpjedhlmp9.ll
33 48 bench/coreutils-rs/optimized/kym4n2c7483sba2.ll
12 9 bench/cpython/optimized/dtoa.ll
4 8 bench/csmith/optimized/FunctionInvocation.ll
13 10 bench/darktable/optimized/TableLookUp.ll
10 7 bench/darktable/optimized/curves.ll
14 8 bench/darktable/optimized/introspection_atrous.ll
10 16 bench/diesel-rs/optimized/4l2dlnns3xjar0un.ll
21 37 bench/diesel-rs/optimized/6cb7zukciz78xvw.ll
4 8 bench/duckdb/optimized/pac.ll
10 18 bench/eastl/optimized/EADateTime.ll
5 6 bench/ffmpeg/optimized/tx_double.ll
5 7 bench/ffmpeg/optimized/tx_float.ll
3 2 bench/fish-rs/optimized/6luvh0o6z0xeo16dcenatpsob.ll
15 17 bench/folly/optimized/EventBase.ll
16 8 bench/freetype/optimized/ftbase.ll
22 19 bench/git/optimized/gc.ll
15 7 bench/git/optimized/trailer.ll
8 14 bench/git/optimized/xmerge.ll
2 6 bench/git/optimized/xutils.ll
44 32 bench/harfbuzz/optimized/hb-subset-cff1.ll
22 16 bench/harfbuzz/optimized/hb-subset-cff2.ll
4 5 bench/hdf5/optimized/H5Shyper.ll
45 36 bench/hdf5/optimized/h5diff_array.ll
10 11 bench/hwloc/optimized/lstopo-draw.ll
30 26 bench/hyperscan/optimized/ng_limex_accel.ll
13 14 bench/hyperscan/optimized/rose_build_infix.ll
53 49 bench/icu/optimized/decNumber.ll
15 17 bench/icu/optimized/unames.ll
2 4 bench/icu/optimized/utext.ll
9 17 bench/ipopt/optimized/SensAlgorithm.ll
7 12 bench/ipopt/optimized/SensMetadataMeasurement.ll
67 55 bench/jq/optimized/regcomp.ll
16 13 bench/lean4/optimized/static.ll
11 19 bench/libigl/optimized/assign_scalar.ll
10 12 bench/libigl/optimized/nchoosek.ll
44 37 bench/libpng/optimized/pngread.ll
32 34 bench/libquic/optimized/v3_lib.ll
3 7 bench/lief/optimized/bignum_core.ll
6 2 bench/linux/optimized/e820.ll
6 3 bench/linux/optimized/hid-core.ll
21 18 bench/llama.cpp/optimized/common.ll
3 8 bench/llvm/optimized/ARMTargetParserCommon.ll
10 8 bench/llvm/optimized/DWARFAcceleratorTable.ll
4 5 bench/llvm/optimized/InlineFunction.ll
30 28 bench/luajit/optimized/lj_profile.ll
17 28 bench/lvgl/optimized/lv_text.ll
6 7 bench/meshlab/optimized/filter_isoparametrization.ll
14 11 bench/meshlab/optimized/mainwindow_RunTime.ll
35 31 bench/mimalloc/optimized/arena.ll
9 7 bench/minetest/optimized/CGUITTFont.ll
4 5 bench/minetest/optimized/content_cso.ll
3 4 bench/minetest/optimized/l_env.ll
6 10 bench/oiio/optimized/imagebufalgo_yee.ll
29 30 bench/oiio/optimized/imageinput.ll
51 42 bench/opencv/optimized/dwt.ll
34 35 bench/opencv/optimized/reduce_layer.ll
7 4 bench/opencv/optimized/upcean_decoder.ll
78 72 bench/openexr/optimized/internal_b44.ll
28 35 bench/openjdk/optimized/ad_x86.ll
8 16 bench/openspiel/optimized/oos.ll
14 16 bench/openssl/optimized/cipher_aes_gcm_siv_polyval.ll
26 46 bench/openssl/optimized/provider.ll
22 25 bench/openssl/optimized/quic_txpim.ll
8 12 bench/openssl/optimized/x509_cmp.ll
53 54 bench/openusd/optimized/decodemv.ll
11 15 bench/openusd/optimized/stageCache.ll
42 36 bench/openusd/optimized/testArResolverContext.ll
29 24 bench/php/optimized/browscap.ll
32 37 bench/pola-rs/optimized/1nb2gyhm0tinqn6ey8ai4djfd.ll
8 20 bench/pola-rs/optimized/2x1snfrtze7jig38mzpup27sc.ll
24 17 bench/pola-rs/optimized/6iuyrj4ccijpoxxv1fx09rxds.ll
15 13 bench/postgres/optimized/inherit.ll
4 5 bench/postgres/optimized/mbprint.ll
14 21 bench/postgres/optimized/vacuumparallel.ll
4 11 bench/protobuf/optimized/lexer.ll
24 12 bench/protobuf/optimized/ruby_generator.ll
7 11 bench/quantlib/optimized/abcd.ll
16 10 bench/quantlib/optimized/analyticdoublebarrierbinaryengine.ll
11 8 bench/quantlib/optimized/pseudosqrt.ll
17 21 bench/quiche-rs/optimized/evfqynx3m984ucpmhnvcicaft.ll
24 32 bench/quinn-rs/optimized/2o4hl0ivtqvy0gs3hj842e52l.ll
33 32 bench/raylib/optimized/raudio.ll
7 3 bench/redis/optimized/dict.ll
7 10 bench/redis/optimized/module.ll
28 25 bench/redis/optimized/server.ll
13 10 bench/rocksdb/optimized/db_impl_open.ll
25 26 bench/ruby/optimized/process.ll
13 11 bench/ruff-rs/optimized/9kdq8p9vbvp469l9m5kewm2r5.ll
25 26 bench/rust-analyzer-rs/optimized/4fo6e09jeifrbt47.ll
21 19 bench/sqlite/optimized/shell.ll
28 33 bench/sqlite/optimized/sqlite3.ll
13 21 bench/turborepo-rs/optimized/74s3x9u7hld928rwmttmetb1y.ll
16 8 bench/typst-rs/optimized/4khbogid70pr8yfn.ll
6 8 bench/velox/optimized/AsyncDataCache.ll
9 8 bench/velox/optimized/Counters.ll
21 14 bench/wasmtime-rs/optimized/1h2b9qnacbe9cbqw.ll
18 11 bench/wasmtime-rs/optimized/4u85yh8sn1llpfha.ll
11 15 bench/wireshark/optimized/packet-dcerpc-lsa.ll
15 19 bench/wireshark/optimized/packet-dcerpc-samr.ll
13 10 bench/wireshark/optimized/packet-rlc-lte.ll
5 11 bench/wireshark/optimized/wslog.ll
5 9 bench/z3/optimized/arith_solver.ll
11 14 bench/z3/optimized/pb2bv_rewriter.ll
9 13 bench/z3/optimized/used_vars.ll
14 18 bench/zed-rs/optimized/59wnsznecs6we2kopjyje48jo.ll
8 12 bench/zxing/optimized/HRI.ll

Copy link
Contributor

The provided diff modifies several LLVM IR functions across multiple projects, primarily involving changes to control flow, phi nodes, and calls to LLVM intrinsics. Here are the major changes summarized:

  1. Control Flow Restructuring with Loop Exit Blocks: Multiple functions introduce or modify .loopexit or .critedge blocks to restructure control flow. For example, in Abc_NtkGetCubePairNum, the .critedge block is split into two parts: one handling the loop exit and another merging results, which allows for better optimization and simplification of phi nodes.

  2. Simplification of Phi Nodes and Value Selection: In several functions (e.g., Cba_FonRangeSize, float_from_string), phi nodes are simplified by removing redundant initializations or merging conditional branches. This reduces complexity and improves clarity in value selection paths.

  3. Use of LLVM Intrinsics for Optimization: Functions like float_from_string and float_from_hex replace manual bit manipulation with calls to @llvm.fshl.i32, leveraging LLVM intrinsics for more efficient code generation.

  4. Elimination of Redundant Comparisons and Stores: In cmCTestMultiProcessHandler, redundant comparisons and stores are removed by using freeze on input values and directly computing results with @llvm.umin.i64, reducing unnecessary branching and memory operations.

  5. Refactoring of Conditional Logic in String and Memory Operations: Functions such as FileNameWithoutLastExtensionB5cxx11E and diff_datum refactor conditional logic to reduce branching and improve data flow, often by precomputing values or using selects instead of branches.

These changes collectively aim to improve code efficiency, reduce redundancy, and enhance optimization opportunities by simplifying control flow and leveraging LLVM intrinsics.

model: qwen-plus-latest
CompletionUsage(completion_tokens=371, prompt_tokens=112645, total_tokens=113016, completion_tokens_details=None, prompt_tokens_details=None)

%6 = sitofp i32 %2 to float
%7 = fdiv float %5, %6
%8 = tail call float @llvm.fmuladd.f32(float %7, float 5.000000e-01, float 5.000000e-01)
br label %9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might count as a regression, if the speculation was desirable.

46: ; preds = %45
%47 = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #33
%48 = add nsw i64 %47, %.sroa.010.0.i
%44 = tail call i64 @llvm.smax.i64(i64 %43, i64 0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression. (The smax is redundant based on the branch condition of the phi edge where it is used.)

br i1 %or.cond3, label %43, label %58

43: ; preds = %38, %37
%mul = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %.045, i32 %29)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression

@dtcxzyw dtcxzyw closed this Aug 2, 2025
@dtcxzyw dtcxzyw deleted the test-run16593641932 branch August 2, 2025 06:40
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.

3 participants