Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Nov 15, 2025

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

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

zyw-bot commented Nov 15, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@fbf74b2
patch: llvm/llvm-project#168007
sha256: 7897ad6711b779545d0bcc9e4c4489e76d19ff0d2911ef3251bd427b81e3d967
commit: 056506a

5742 files changed, 1395222 insertions(+), 1405434 deletions(-)

Improvements:
  indvars.NumElimIdentity 1849 -> 1864 +0.81%
  adce.NumRemoved 94974 -> 95572 +0.63%
  adce.NumBranchesRemoved 23102 -> 23192 +0.39%
  instcombine.NegatorNumNegationsFoundInCache 4703 -> 4713 +0.21%
  correlated-value-propagation.NumCmps 272345 -> 272858 +0.19%
  instsimplify.NumReassoc 800452 -> 801723 +0.16%
  loop-simplifycfg.NumTerminatorsFolded 10818 -> 10832 +0.13%
  sccp.NumInstReplaced 132883 -> 133053 +0.13%
  loop-rotate.NumNotRotatedDueToHeaderSize 5134 -> 5140 +0.12%
  bdce.NumRemoved 383988 -> 384306 +0.08%
Regressions:
  correlated-value-propagation.NumAddNSW 220374 -> 216364 -1.82%
  simple-loop-unswitch.NumSwitches 1765 -> 1736 -1.64%
  correlated-value-propagation.NumMinMax 12152 -> 11982 -1.40%
  correlated-value-propagation.NumAddNW 432642 -> 428612 -0.93%
  simple-loop-unswitch.NumTrivial 3282 -> 3257 -0.76%
  correlated-value-propagation.NumNSW 569634 -> 565510 -0.72%
  correlated-value-propagation.NumNW 953240 -> 949025 -0.44%
  dse.NumCFGSuccess 8344 -> 8309 -0.42%
  instcombine.NumExpand 2684 -> 2675 -0.34%
  correlated-value-propagation.NumSaturating 2585 -> 2577 -0.31%

+24 typst-rs/53ug9lwflkq7ucu8.ll
+6 openexr/parse_header.ll
+6 postgres/brin_bloom.ll
+5 wireshark/packet-dhcp.ll
+4 faiss/VectorTransform.ll
+4 ffmpeg/pixlet.ll
+4 php/string.ll
+4 slurm/KeccakP-1600-opt64.ll
+3 boost/args_cmd.ll
+3 cpython/mpdecimal.ll
+3 hyperscan/rose_build_merge.ll
+3 openjdk/g1Policy.ll
+3 sdl/SDL_blit_N.ll
+2 abseil-cpp/decode_rust_punycode.ll
+2 boost/area.ll
+2 ffmpeg/tx.ll
+2 fish-rs/8ak4n2mvycfph6keb8t69chot.ll
+2 hermes/LEB128.ll
+2 icu/collationfastlatin.ll
+2 libwebp/cost_enc.ll
+2 logos-rs/bt773r0511h3mpz.ll
+2 oiio/oiio_gpu.ll
+2 openssl/bio_base64_test.ll
+2 ruby/iseq.ll
+2 wasmtime-rs/4bsmuvpz9r22ks1w.ll
+1 brotli/brotli_bit_stream.ll
+1 darktable/introspection_flip.ll
+1 draco/rans_bit_decoder.ll
+1 hyperscan/ng_width.ll
+1 icu/nfrs.ll
+1 llvm/SemaObjCProperty.ll
+1 logos-rs/3lrtayubazmm8yhl.ll
+1 luajit/lj_opt_fold.ll
+1 opencv/j2k.ll
+1 opencv/qrcode_encoder.ll
+1 openmpi/psquash_flex128.ll
+1 openusd/pathExpressionEval.ll
+1 pocketpy/str.ll
+1 recastnavigation/RecastDebugDraw.ll
+1 regex-rs/4qhif1ofea978syx.ll
+1 rocksdb/block.ll
+1 ruff-rs/0jxokf4xx9lz4dh6x5yfoh8sv.ll
+1 ruff-rs/8elsw9opmu2f4zc2b86bmteg8.ll
-1 abc/ivyFraig.ll
-1 box2d/imgui_draw.ll
-1 cvc5/bags_utils.ll
-1 darktable/circle.ll
-1 darktable/introspection_highpass.ll
-1 freetype/pshinter.ll
-1 g2o/vertex_ellipse.ll
-1 jemalloc/stats.ll
-1 lean4/object.ll
-1 libigl/ImGuizmoWidget.ll
-1 libigl/group_sum_matrix.ll
-1 libwebp/picture_tools_enc.ll
-1 lief/nist_kw.ll
-1 llvm/APFixedPoint.ll
-1 lz4/lz4io.ll
-1 openblas/strsm_kernel_LT.ll
-1 redis/quicklist.ll
-1 rocksdb/version_set.ll
-1 stb/stb_connected_components.ll
-1 tinyobjloader/tiny_obj_loader.ll
-1 turborepo-rs/5x6vf5oc1gv1cmh03slcaf29a.ll
-1 yosys/BigUnsigned.ll
-2 boost/alloc_lib.ll
-2 cmake/archive_write_set_format_iso9660.ll
-2 duckdb/jemalloc.ll
-2 ffmpeg/photocd.ll
-2 hwloc/topology-xml.ll
-2 llvm/LegalizerHelper.ll
-2 meshlab/apss.ll
-2 quest/QuEST_validation.ll
-2 re2/prog.ll
-2 redis/ziplist.ll
-2 tokio-rs/27wc5j4mui8auwxp.ll
-2 tokio-rs/4brh9kql6tjayli1.ll
-2 typst-rs/59tuvc5m3xlovl3o.ll
-2 wasmi-rs/brtjllbaryvnnezonl24vb7vd.ll
-3 abc/superGate.ll
-3 abseil-cpp/status.ll
-3 arrow/array_dict.ll
-3 arrow/builder_dict.ll
-3 arrow/type.ll
-3 assimp/CalcTangentsProcess.ll
-3 cpython/socketmodule.ll
-3 faiss/OnDiskInvertedLists.ll
-3 hdf5/H5checksum.ll
-3 icu/bmpset.ll
-3 jq/decNumber.ll
-3 luajit/lj_debug.ll
-3 mold/gdb-index.cc.X86_64.ll
-3 openjdk/mutableNUMASpace.ll
-3 proj/networkfilemanager.ll
-3 rust-analyzer-rs/1jnytxsf9ijspdxz.ll
-3 smol-rs/2itwlwnaucg2cdit.ll
-3 zed-rs/38cn6p2m6864jrrxog4mr8xwk.ll
-4 abc/ifUtil.ll
-4 clamav/unicode.ll
-4 cvc5/sat_proof_manager.ll
-4 flatbuffers/idl_gen_cpp.ll
-4 folly/Init.ll
-4 hermes/SimpleStackPromotion.ll
-4 hwloc/lstopo-shmem.ll
-4 node/stream.ll
-4 pbrt-v4/paramdict.ll
-4 spike/csrs.ll
-4 z3/automaton.ll
-4 z3/seq_rewriter.ll
-5 abc/llb2Flow.ll
-5 ffmpeg/mxpegdec.ll
-5 wireshark/packet-uftp4.ll
-5 wolfssl/keys.ll
-6 arrow/chunked_array.ll
-6 coreutils-rs/gag8htnqkrxvy02.ll
-6 eastl/TestIntrusiveList.ll
-6 folly/Crc32CombineDetail.ll
-6 rust-analyzer-rs/53ntv1pfq7fnns7g.ll
-6 tokenizers-rs/pctti7iv1zxrcsb.ll
-7 icu/pkg_genc.ll
-7 openjdk/parse1.ll
-8 abc/abcRenode.ll
-8 base64-rs/1a04td3ag2jefly3.ll
-8 eastl/TestExtra.ll
-8 eastl/TestIterator.ll
-8 folly/Contains.ll
-8 open3d/size_vector.ll
-8 proxygen/HTTPSession.ll
-9 bdwgc/gc.ll
-9 nuklear/unity.ll
-9 openjdk/cmsio0.ll
-11 php/hash_xxhash.ll
-12 quickjs/cutils.ll
-12 sdl/SDL_mixer.ll
-13 rocksdb/coalescing_iterator.ll
-16 folly/AsyncSocket.ll

@github-actions
Copy link
Contributor

The provided patch makes several key changes to LLVM IR code across multiple files. Here is a summary of the major changes:

  1. Optimization of Bounds Checks: Several instances replace icmp ult (unsigned less than) comparisons with icmp eq checks after right-shifting values. This pattern appears in functions like Abc_NtkRenodeEvalBdd, Abc_NtkRenodeEvalSop, and others, where instead of checking if a value is less than a power of two, the code now checks if the shifted value equals zero. This can be more efficient on certain architectures.

  2. Removal of umax Calls: Multiple occurrences of @llvm.umax.i64 and @llvm.umax.i32 calls are eliminated. Instead of using these intrinsic functions to ensure minimum values (typically 1), the code directly uses the original or shifted values. This change removes function call overhead and simplifies the IR.

  3. Phi Node Reordering and Simplification: In various loops, phi nodes are reordered or simplified, often moving initial values from preheader blocks into the main loop entry points. This reduces the number of basic blocks and simplifies control flow, as seen in Vec_IntPush.exit and similar functions.

  4. Switch Statement Optimization: Some switch statements have unreachable default cases removed (e.g., ._crit_edge.i.i.i.unreachabledefault), which cleans up the control flow graph and eliminates dead code paths.

  5. Loop Structure Simplification: Several loops have their structure streamlined by removing preheader blocks and directly connecting loop conditions to the loop body, as observed in flatbuffers::idl_gen_cpp.ll and other files. This reduces branching complexity and improves predictability.

These changes collectively aim to simplify the generated IR, reduce unnecessary function calls, optimize conditional checks, and streamline control flow, potentially leading to better performance after further optimization passes.

model: qwen-plus-latest
CompletionUsage(completion_tokens=392, prompt_tokens=105555, total_tokens=105947, completion_tokens_details=None, prompt_tokens_details=None)

%cmp3 = icmp ult i64 %Value.addr.0, 64
br i1 %cmp3, label %lor.end, label %lor.rhs
%or.cond = and i1 %cmp3, %cmp
br i1 %or.cond, label %lor.end, label %lor.rhs
Copy link
Owner

Choose a reason for hiding this comment

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

Regression.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants