[clang] [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (PR #133546)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 13:14:11 PDT 2025
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>,
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>,
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>,
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>,
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/133546 at github.com>
efriedma-quic wrote:
Oh, hmm, we have range metadata, but it gets killed by mem2reg. So instcombine could do the transform, but it runs too late. (In theory it could try to preserve range metadata; see convertMetadataToAssumes . But probably simpler here to just generate the markings.)
> make getRangeForLoadFromType a public method and use it for atomic load as well
This seems fine.
https://github.com/llvm/llvm-project/pull/133546
More information about the cfe-commits
mailing list