[all-commits] [llvm/llvm-project] f7f757: [InstCombine] Canonicalize `switch(C-X)` to `switc...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Fri Jan 5 05:03:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f7f7574afe4cfc11ebe5d8cb811d5cd28dc862f6
      https://github.com/llvm/llvm-project/commit/f7f7574afe4cfc11ebe5d8cb811d5cd28dc862f6
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    A llvm/test/Transforms/InstCombine/switch-sub.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize `switch(C-X)` to `switch(X)` (#77051)

This patch canonicalizes `switch(C-X)` to `switch(X)`.

Compile-time impact:
http://llvm-compile-time-tracker.com/compare.php?from=7954c57124b495fbdc73674d71f2e366e4afe522&to=31a9adff1e633f0f3c423fb8487fc15d17e171f2&stat=instructions:u

|stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang|
|--|--|--|--|--|--|--|
|-0.01%|+0.02%|+0.02%|+0.05%|-0.07%|-0.02%|-0.02%|




More information about the All-commits mailing list