Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

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

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

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

zyw-bot commented Oct 27, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@6bf6bab
patch: llvm/llvm-project#160483
sha256: abd7729627f7a12c1e691b4b65bf056b826ef6feb8387077946d1328146d0893
commit: 67b81d9

216 files changed, 252681 insertions(+), 255058 deletions(-)

Improvements:
  bdce.NumSExt2ZExt 4070 -> 4076 +0.15%
  simple-loop-unswitch.NumCostMultiplierSkipped 17244 -> 17248 +0.02%
  correlated-value-propagation.NumSExt 47288 -> 47298 +0.02%
  loop-instsimplify.NumSimplified 182082 -> 182104 +0.01%
  instcombine.NumSunkInst 3400380 -> 3400734 +0.01%
  simplifycfg.NumHoistCommonCode 836704 -> 836764 +0.01%
  reassociate.NumChanged 4988617 -> 4988884 +0.01%
  aggressive-instcombine.NumExprsReduced 19987 -> 19988 +0.01%
  simplifycfg.NumHoistCommonInstrs 2423224 -> 2423328 +0.00%
  correlated-value-propagation.NumSubNSW 77555 -> 77558 +0.00%
Regressions:
  correlated-value-propagation.NumAShrsConverted 3494 -> 3484 -0.29%
  local.NumPHICSEs 191828 -> 191639 -0.10%
  correlated-value-propagation.NumShlNSW 117270 -> 117186 -0.07%
  correlated-value-propagation.NumAnd 44203 -> 44183 -0.05%
  instcombine.NegatorNumNegationsFoundInCache 4717 -> 4715 -0.04%
  jump-threading.NumDupes 129638 -> 129592 -0.04%
  correlated-value-propagation.NumShlNW 269851 -> 269764 -0.03%
  instcombine.NegatorMaxDepthVisited 20088 -> 20083 -0.02%
  correlated-value-propagation.NumNSW 569766 -> 569664 -0.02%
  instcombine.NegatorMaxTotalValuesVisited 62031 -> 62024 -0.01%

+10 grpc/time.ll
+8 pola-rs/8jp76n2tmi4x2dvxoma5qtaa7.ll
+2 ocio/Lut1DOpData.ll
+1 ffmpeg/clearvideo.ll
+1 freetype/psaux.ll
+1 luau/AssemblyBuilderX64.ll
+1 nuklear/unity.ll
+0 abc/ivyFastMap.ll
+0 arrow/list_util.ll
+0 cpython/_cursesmodule.ll
+0 icu/number_mapper.ll
+0 llvm/Lexer.ll
+0 llvm/X86InstCombineIntrinsic.ll
+0 opencv/gapi_imgproc_perf_tests.ll
+0 openjdk/assembler_x86.ll
+0 raylib/rtextures.ll
+0 wasmi-rs/5u9yytvr2y94asl5o7aafpnhk.ll
-1 abc/abcPrint.ll
-1 abseil-cpp/log_format.ll
-1 cpython/_testinternalcapi.ll
-1 eastl/EASprintfCore.ll
-1 icu/measunit_extra.ll
-1 image-rs/2ndzmzcdt55acj4k.ll
-1 jiff-rs/e4m488lukglmxlpbdqjrf7sst.ll
-1 wireshark/packet-thrift.ll
-2 arrow/bridge.ll
-2 cmake/xmlparse.ll
-2 duckdb/libfsst.ll
-2 hermes/APFloat.ll
-2 libjpeg-turbo/jidctfst.ll
-2 lvgl/lv_freetype.ll
-2 raylib/raudio.ll
-2 ruff-rs/4y0unrlbgjyvysqyc1zrg4crs.ll
-2 uv-rs/f0fhlz8kt73wyd81nep9kme9d.ll
-2 zed-rs/89f8nno15240ug8tk8i1phh9j.ll
-3 abseil-cpp/arg.ll
-3 freetype/truetype.ll
-3 hyperscan/charreach.ll
-3 llvm/AArch64InstPrinter.ll
-3 wireshark/packet-dbus.ll
-3 wireshark/packet-dcerpc-spoolss.ll
-3 zed-rs/9ectarykacvre31n6szd6qq9m.ll
-3 zed-rs/c43xk22aeat7jwaky6ehuopzs.ll
-4 chibicc/parse.ll
-4 ncnn/gemm_x86_avx512vnni.ll
-4 oiio/filesystem.ll
-4 oiio/strutil.ll
-4 openjdk/jvmciRuntime.ll
-4 zed-rs/bkp2u7tfyqnnhpthgztcor9ly.ll
-6 ffmpeg/integer.ll
-6 zed-rs/9wvbl62ry9kmh1ntb1bvaauiz.ll
-7 postgres/nbtcompare.ll
-8 hermes/regexec.ll
-8 velox/Sequence.ll
-15 wasmtime-rs/3ks7b643ljwe3j81.ll
-16 spike/vmulh_vx.ll
-23 postgres/int.ll
-24 pola-rs/5igj4k372mlhkf3aildnxq1ta.ll

@github-actions
Copy link
Contributor

Here is a high-level summary of the major changes in the provided LLVM IR diff:

  1. Replacement of sign-extension patterns with sext: A common pattern involving trunc followed by left/right shifts to extract and sign-extend small integers (e.g., from i64 to i32 via i8 or i16) has been replaced with direct use of the sext (sign-extend) instruction. This simplifies code and improves clarity, as seen across multiple files like abcPrint.ll, arg.ll, log_format.ll, and others.

  2. Use of smaller integer types for truncation: Instead of truncating 64-bit values directly to 32 bits (trunc i64 %val to i32), many instances now truncate to narrower types such as i8 or i16. This is often paired with sext to achieve the same semantic result more efficiently.

  3. Simplification of arithmetic comparisons and conditionals: In several functions (e.g., in ffmpeg/clearvideo.ll and abseil-cpp/log_format.ll), complex sequences of bit manipulation and shifting used for byte extraction are replaced with simpler logic using shl/ashr on 64-bit values, reducing instruction count and improving readability.

  4. Optimization of switch statements and control flow: Some diffs show updated label references in switch instructions and phi nodes due to restructured control flow, such as in chibicc/parse.ll and cmake/xmlparse.ll, where branch targets and phi incoming blocks are adjusted after optimization passes.

  5. Improved loop handling and induction variable usage: Changes in induction variable types and updates to loop exit blocks (e.g., in arrow/list_util.ll and duckdb/libfsst.ll) reflect better loop optimization, including correct tracking of preheaders and loop exits after transformations.

These changes collectively indicate an improvement in code generation quality, favoring simpler, more canonical LLVM IR patterns that are easier for downstream optimizations to analyze and transform.

model: qwen-plus-latest
CompletionUsage(completion_tokens=437, prompt_tokens=116657, total_tokens=117094, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Oct 27, 2025
@dtcxzyw dtcxzyw deleted the test-run18847245180 branch October 27, 2025 17:35
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.

2 participants