Skip to content

Conversation

zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Aug 10, 2025

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

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

zyw-bot commented Aug 10, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@b2cdd80
patch: llvm/llvm-project#152851
sha256: 0ac50adc25065e188a88330bb56e8d8f9023a6a96efc176716c86cc323b7ddbe
commit: d40397f

73 files changed, 45153 insertions(+), 46694 deletions(-)

Improvements:
  instsimplify.NumReassoc 838814 -> 838848 +0.00%
  instcombine.NumSunkInst 3462828 -> 3462889 +0.00%
  local.NumRemoved 5436794 -> 5436870 +0.00%
  simplifycfg.NumSinkCommonInstrs 803157 -> 803163 +0.00%
  simplifycfg.NumSinkCommonCode 370722 -> 370724 +0.00%
  simplifycfg.NumFoldBranchToCommonDest 764436 -> 764440 +0.00%
  simplifycfg.NumSpeculations 399999 -> 400001 +0.00%
  function-attrs.NumCapturesPartial 512720 -> 512722 +0.00%
  bdce.NumRemoved 384104 -> 384105 +0.00%
  globalsmodref-aa.NumReadMemFunctions 1203876 -> 1203879 +0.00%
Regressions:
  licm.NumBOAssociationsHoisted 6905 -> 6901 -0.06%
  early-cse.NumCSECVP 102537 -> 102529 -0.01%
  gvn.NumPRELoadMoved2CEPred 84235 -> 84231 -0.00%
  gvn.NumGVNInstr 155566 -> 155562 -0.00%
  gvn.NumGVNPRE 155566 -> 155562 -0.00%
  reassociate.NumChanged 5084112 -> 5084011 -0.00%
  memory-builtins.ObjectVisitorLoad 2455568 -> 2455520 -0.00%
  licm.NumHoisted 5404258 -> 5404172 -0.00%
  loop-rotate.NumRotated 1186007 -> 1185989 -0.00%
  loop-rotate.NumInstrsDuplicated 3100389 -> 3100351 -0.00%

16 15 bench/actix-rs/optimized/14bh10sj718x2c7a.ll
18 17 bench/assimp/optimized/glTF2Importer.ll
13 12 bench/delta-rs/optimized/3qkwqfk85qralejq.ll
4 3 bench/duckdb/optimized/extent_dss.ll
45 44 bench/duckdb/optimized/ub_duckdb_storage.ll
34 32 bench/ffmpeg/optimized/nuv.ll
37 35 bench/folly/optimized/JemallocHugePageAllocator.ll
19 18 bench/gromacs/optimized/threaded_force_buffer.ll
2 3 bench/hermes/optimized/BytecodeDataProvider.ll
196 188 bench/influxdb-rs/optimized/17ptp6pnu4b90vr6.ll
10 9 bench/libwebp/optimized/image_enc.ll
30 29 bench/linux/optimized/cipso_ipv4.ll
41 40 bench/linux/optimized/kexec_core.ll
68 67 bench/linux/optimized/slub.ll
37 36 bench/llama.cpp/optimized/llama-quant.ll
37 36 bench/llvm/optimized/CoverageMappingReader.ll
43 42 bench/llvm/optimized/DeadStoreElimination.ll
5 4 bench/llvm/optimized/InstrProfWriter.ll
20 27 bench/llvm/optimized/LoopAccessAnalysis.ll
12 11 bench/llvm/optimized/RISCVFrameLowering.ll
19 18 bench/llvm/optimized/StableFunctionMapRecord.ll
33 34 bench/llvm/optimized/VNCoercion.ll
16 12 bench/luau/optimized/UnwindBuilderDwarf2.ll
15 14 bench/meilisearch-rs/optimized/4rynht2gwvphprvy.ll
21 19 bench/oiio/optimized/iffoutput.ll
15 13 bench/open3d/optimized/FileGLTF.ll
17 24 bench/opencv/optimized/array.ll
18 16 bench/openjdk/optimized/cmsplugin.ll
12 9 bench/pola-rs/optimized/40wah5zis7dsqiheha5veerhb.ll
6 5 bench/pola-rs/optimized/5eb1qorc93yw2vdp0woub3vux.ll
5 4 bench/pola-rs/optimized/5r6bpzr3iq4oa63aqa1e1zbef.ll
6 5 bench/pola-rs/optimized/as7suv65wnsi8dejqo34kd8uw.ll
25 24 bench/postgres/optimized/ginentrypage.ll
19 11 bench/postgres/optimized/pg_backup_tar.ll
24 23 bench/rust-analyzer-rs/optimized/2ydioyxkoxez3z9r.ll
3 2 bench/spike/optimized/spike.ll
24 23 bench/typst-rs/optimized/3z60jkym58xbhjyi.ll
16 15 bench/typst-rs/optimized/59tuvc5m3xlovl3o.ll
34 31 bench/wasmtime-rs/optimized/4sy2q5i3qnvymrev.ll
22 21 bench/wireshark/optimized/eax.ll
15 13 bench/wireshark/optimized/pcapng.ll
17 16 bench/xgboost/optimized/recordio.ll
19 19 bench/yosys/optimized/BigUnsigned.ll
121 112 bench/z3/optimized/dl_sparse_table.ll
27 26 bench/zed-rs/optimized/bpcj0xb6nmpne8ezqc5krm4m9.ll

Copy link
Contributor

The provided patch modifies multiple LLVM IR files across various benchmarks. The primary changes are related to improving alignment checks and memory operations. Here are the major changes:

  1. Replacement of alignment checks with bitwise operations: In multiple files (e.g., actix-rs, assimp, duckdb, ffmpeg), alignment checks of the form icmp eq i64 (add x, mask), x are replaced with more efficient and operations: icmp eq i64 (and x, mask), 0. This is a common optimization for checking if a value is aligned to a power-of-two boundary.

  2. Improved PHI node handling: Several PHI nodes are updated to reference correct predecessor blocks after code reorganization, particularly in landing pad and exception handling code paths. This maintains correct control flow while the logic is optimized.

  3. Memory initialization optimization: In functions like luau's defineSavedRegisterLocation and llvm's RISCVFrameLowering, the pattern of calculating padding and calling llvm.memset.p0.i64 is enhanced by using llvm.umax.i64 to ensure at least one byte is zeroed, which may help with certain optimization passes.

  4. Phi node cleanup in cleanup paths: Multiple cleanup and exception handling paths (e.g., in influxdb-rs, pola-rs) have their PHI nodes updated to reference the correct basic blocks after restructuring, ensuring proper exception propagation.

  5. Call argument updates: In several locations (e.g., duckdb, influxdb-rs), call instructions are updated to use the correct operands after local value numbering and optimization changes, particularly involving atomic operations and Arc reference counting.

These changes appear to be the result of improved optimization passes, particularly around alignment checking and exception handling, leading to more efficient and correct IR generation.

model: qwen-plus-latest
CompletionUsage(completion_tokens=391, prompt_tokens=110092, total_tokens=110483, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Aug 10, 2025
@dtcxzyw dtcxzyw deleted the test-run16858423157 branch August 19, 2025 15:30
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