Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

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

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

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

zyw-bot commented Oct 24, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@c18c3cc
patch: llvm/llvm-project#160483
sha256: be8ed52c10f01bb428e7baf4d22ce8e264c6304c4c220db04ed86213d50766a0
commit: 7b19114

208 files changed, 237982 insertions(+), 240336 deletions(-)

Improvements:
  bdce.NumSExt2ZExt 4070 -> 4076 +0.15%
  simple-loop-unswitch.NumCostMultiplierSkipped 17234 -> 17238 +0.02%
  correlated-value-propagation.NumSExt 47287 -> 47297 +0.02%
  loop-instsimplify.NumSimplified 180923 -> 180945 +0.01%
  instcombine.NumSunkInst 3400260 -> 3400607 +0.01%
  simplifycfg.NumHoistCommonCode 836754 -> 836816 +0.01%
  reassociate.NumChanged 4990611 -> 4990878 +0.01%
  aggressive-instcombine.NumExprsReduced 19987 -> 19988 +0.01%
  simplifycfg.NumHoistCommonInstrs 2423227 -> 2423335 +0.00%
  correlated-value-propagation.NumNNeg 96056 -> 96060 +0.00%
Regressions:
  correlated-value-propagation.NumAShrsConverted 3494 -> 3484 -0.29%
  local.NumPHICSEs 191828 -> 191639 -0.10%
  correlated-value-propagation.NumShlNSW 117275 -> 117190 -0.07%
  correlated-value-propagation.NumAnd 44207 -> 44187 -0.05%
  instcombine.NegatorNumNegationsFoundInCache 4717 -> 4715 -0.04%
  jump-threading.NumDupes 129638 -> 129592 -0.04%
  correlated-value-propagation.NumShlNW 269862 -> 269773 -0.03%
  instcombine.NegatorMaxDepthVisited 20088 -> 20083 -0.02%
  correlated-value-propagation.NumNSW 569772 -> 569674 -0.02%
  instcombine.NegatorMaxTotalValuesVisited 62031 -> 62024 -0.01%

+10 grpc/time.ll
+8 pola-rs/8jp76n2tmi4x2dvxoma5qtaa7.ll
+4 cpython/_cursesmodule.ll
+2 ocio/Lut1DOpData.ll
+1 ffmpeg/clearvideo.ll
+1 freetype/psaux.ll
+1 luau/AssemblyBuilderX64.ll
+1 nuklear/unity.ll
+1 wireshark/packet-thrift.ll
+0 arrow/list_util.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
-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 wireshark/packet-umts_rlc.ll
-2 zed-rs/89f8nno15240ug8tk8i1phh9j.ll
-2 zed-rs/avkcaupfon6sc5v4swrdwryed.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
-15 wasmtime-rs/3ks7b643ljwe3j81.ll
-16 spike/vmulh_vx.ll
-23 postgres/int.ll
-24 pola-rs/5igj4k372mlhkf3aildnxq1ta.ll

@github-actions
Copy link
Contributor

The provided patch consists of several LLVM IR changes across multiple benchmarks. The major changes can be summarized as follows:

  1. Optimization of sign extension patterns: A recurring change replaces sequences of trunc followed by arithmetic left shift and exact arithmetic right shift (e.g., trunc i64 to i32, then shl and ashr) with more efficient sign extension (sext) from smaller types (e.g., i8 or i16) directly to i32. This simplifies the IR and improves performance by reducing instruction count.

  2. Use of narrower integer types for truncation: In many cases, values are now truncated to i8 or i16 instead of i32, followed by a direct sext to i32. This reduces unnecessary bit manipulation and better reflects the actual data usage.

  3. Phi node label updates: Several phi instructions have their predecessor block labels updated due to reordering or restructuring of control flow, such as loop exits being redirected to new blocks after optimization.

  4. Improved comparison and branching logic: Some comparisons are simplified by operating on narrower types or using more direct operations (e.g., comparing i8 instead of extended i32 values), which streamlines conditional logic.

  5. Loop structure and label renaming: Loop exit blocks and associated labels are renamed or redirected (e.g., .loopexit70 instead of .loopexit71), indicating internal loop optimization or unrolling changes that affect control flow but not semantics.

These changes collectively aim to simplify IR, reduce redundant operations, and improve code generation efficiency, particularly in handling small integer sign extensions and comparisons.

model: qwen-plus-latest
CompletionUsage(completion_tokens=359, prompt_tokens=117279, total_tokens=117638, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants