[PATCH] D50233: [InstCombine] Transform str(n)cmp to memcmp
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 12:30:37 PDT 2018
efriedma added a comment.
> Does LLVM's implementation somehow guarantee that no later optimization pass comes along, sees the program reading uninitialized memory and declares UB?
In LLVM IR, reading uninitialized memory isn't itself UB; it's only UB if you perform certain operations on the result. Granted, a naive LLVM IR implementation of memcmp might involve operations which lead to UB.
Repository:
rL LLVM
https://reviews.llvm.org/D50233
More information about the llvm-commits
mailing list