You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a concise summary of the major changes in the patch:
Reordered Bitwise Operations: In multiple files (amapUniq.ll, mapperTree.ll, satSolver.ll, F14Table-related files), sequences of and, add, and or disjoint operations were reordered—typically moving an and operation later in the chain and adjusting operand order in add/or instructions. This preserves semantics but reflects instruction reordering (e.g., and A, M; add B, C → add B, C; and result, M).
Shift/Scale Constant Adjustments: Several arithmetic sequences were optimized by replacing shift-and-add patterns with direct multiplies or adjusted shifts—for example, lshr i16 ..., 1 → lshr ..., 2 in cavs.ll and webp.ll, and shl ..., 3; add ..., -8 → and ..., -8; add ..., -8 in eastl.ll and cmake/System.ll. These reflect strength reduction or alignment-aware offset computation.
Phi Node Operand Updates: Across many files (mpmPre.ll, cmJSONState.ll, darktable/*.ll, harfbuzz/*.ll, libphonenumber/*.ll, etc.), phi node incoming value blocks were updated to match new control-flow edge labels (e.g., %295 → %291), indicating CFG restructuring—likely due to loop rotation, sinking, or block merging.
Masking and Alignment Fixes: Several memory-related computations now use and i64 ..., -N (e.g., -8, -16, -256, -4294967296) to compute aligned offsets instead of subtracting and masking manually (e.g., sub ..., 8; and ..., -8). This appears in cmake/System.ll, bdwgc/gc.ll, eastl/EACallback.ll, and graphviz/emit.ll, suggesting improved alignment handling.
Constant Folding & Bitfield Logic Simplification: In mpmPre.ll, bit extraction via lshr + and was replaced with direct and with a mask (e.g., lshr ..., 24; and ..., 31 → and ..., 520093696), and similar replacements occurred for other bitfield masks (e.g., 16515072). This indicates aggressive constant propagation and bitfield optimization.
The changes are consistent with backend optimizations—particularly instruction combining, alignment-aware addressing, phi cleanup after CFG changes, and bit manipulation simplifications—without altering program semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link: llvm/llvm-project#165975
Requested by: @dtcxzyw