[PATCH] D128501: [CodeGen] Make uninitialized Lvalue bit-field stores poison compatible

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 16:31:39 PDT 2022


efriedma added a comment.

> Is there no way in LLVM to load partially-initialized memory and then freeze it that will preserve the parts of the value that are initialized? Because that seems like something that LLVM needs to be providing.

It's currently possible to `load <32 x i1>`, freeze the result, and bitcast it to i32.  But the backend is likely to turn that into something messy.  Otherwise, no, there isn't really any way to load a partially poisoned value as an i32.

This is loosely related to https://discourse.llvm.org/t/a-memory-model-for-llvm-ir-supporting-limited-type-punning/61948 .


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128501/new/

https://reviews.llvm.org/D128501



More information about the cfe-commits mailing list