[llvm] [RISCV] Remove `AND` mask generated by `( zext ( atomic_load ) )` by replacing the load with `zextload` for orderings not stronger then monotonic. (PR #136502)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 15:53:17 PDT 2025
Jan =?utf-8?q?Górski?= <jan.a.gorski at wp.pl>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/136502 at github.com>
topperc wrote:
I spoke with @preames and he told me that it is not safe to replace an ISD::ATOMIC_LOAD with an ISD::LOAD in the current SelectionDAG. I think there are optimizations that don't expect an ISD::LOAD to be atomic and make unsafe changes.
We should make an ISD::ATOMIC_LOAD here with ISD::ZEXTLOAD extension type. I made a couple patches yesterday to make that more possible 704fc6542cf171c603bd387663a2de3a3fa9c4ff and f6178cdad03468a9801a23f8f7e80927614fdb7e.
https://github.com/llvm/llvm-project/pull/136502
More information about the llvm-commits
mailing list