[llvm] [InstCombine] Fold `switch(zext/sext(X))` into `switch(X)` (PR #76988)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 22:47:31 PST 2024


dtcxzyw wrote:

> <!DOCTYPE html><p dir="auto" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Compile-time impact:<span class="Apple-converted-space"> </span><a href="http://llvm-compile-time-tracker.com/compare.php?from=7954c57124b495fbdc73674d71f2e366e4afe522&to=502b13ed34e561d995ae1f724cf06d20008bd86f&stat=instructions:u" rel="nofollow" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">http://llvm-compile-time-tracker.com/compare.php?from=7954c57124b495fbdc73674d71f2e366e4afe522&to=502b13ed34e561d995ae1f724cf06d20008bd86f&stat=instructions:u</a></p>
stage1-O3 | stage1-ReleaseThinLTO | stage1-ReleaseLTO-g | stage1-O0-g | stage2-O3 | stage2-O0-g | stage2-clang
-- | -- | -- | -- | -- | -- | --
+0.03% | +0.06% | +0.07% | +0.00% | -0.02% | -0.03% | +0.02%

Does `SimplifyCFG` revert this transform?



https://github.com/llvm/llvm-project/pull/76988


More information about the llvm-commits mailing list