[clang] [clang] Better bitfield access units (PR #65742)
Nathan Sidwell via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 11 04:13:27 PDT 2023
urnathan wrote:
> > > Note that changing the memory accesses performed by clang (load or store) _is_ an ABI change at IR level because of UB.
> >
> >
> > Could you clarify why UB is a consideration here?
>
> There's some weirdness with poison values; see https://reviews.llvm.org/D129541 etc. This is mostly an IR modeling thing; the machine instructions work fine, we just need to make sure we don't accidentally poison IR values that aren't supposed to be poison.
Certainly, by could you clarify why changing the access patterns could do that? My understanding of Poison is that should they cause a user-visible state change, that's indicative of the original progam's UB, and the languages in question don't guarantee anything at that point -- nasal demons and all. That the observed behaviour of a UB-exhibiting program changes is not a defect. What am I missing?
https://github.com/llvm/llvm-project/pull/65742
More information about the cfe-commits
mailing list