[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 06:55:54 PDT 2022


nikic added a comment.

At least in C++, working with uninitialized memory is pretty much always immediate undefined behavior, see https://eel.is/c++draft/basic.indet for the relevant wording. The only exception are "copy-like" operations on unsigned character types, which comparisons do not fall under.

I believe the C specification is less clear cut about this, but Clang and LLVM assume basically the same to also hold for C code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136284



More information about the llvm-commits mailing list