[all-commits] [llvm/llvm-project] e80f13: [SeparateConstOffsetFromGEP] Decompose xor constan...
Antonio Frighetto via All-commits
all-commits at lists.llvm.org
Thu Jun 4 23:59:53 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e80f1329ce2ba3fb775e6ca0f9b69f4ab3f3866a
https://github.com/llvm/llvm-project/commit/e80f1329ce2ba3fb775e6ca0f9b69f4ab3f3866a
Author: Antonio Frighetto <me at antoniofrighetto.com>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
A llvm/test/Transforms/SeparateConstOffsetFromGEP/AMDGPU/xor-decompose.ll
A llvm/test/Transforms/SeparateConstOffsetFromGEP/xor-decompose.ll
Log Message:
-----------
[SeparateConstOffsetFromGEP] Decompose xor constant operand when possible (#195830)
It may be desirable to fold constants directly into the addressing mode
when computing an address. While lowering GEPs and looking for a
constant to extract among the indexes, take into account constants which
are xor expressions as well. When some bits of the constant operand of
the xor are known-zero in the base operand, then, for those specific
bits (disjoint bits), xor and additions behave alike. Such bits may be
extracted from the xor, and are those that can contribute to the final
GEP offset.
Proofs: https://alive2.llvm.org/ce/z/JtmXsu.
Co-authored-by: Sumanth Gundapaneni <sumanth.gundapaneni at amd.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list