[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 00:16:54 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2905
+ for (unsigned I = 0; I < Call.arg_size(); ++I) {
+ if (Call.paramHasAttr(I, Attribute::NoUndef) &&
+ isa<UndefValue>(Call.getArgOperand(I))) {
----------------
Call.isPassingUndefUB(I). You probably want to flip the checks, because the UndefValue check is cheaper. Also add tests with dereferenceable instead of noundef.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133036/new/
https://reviews.llvm.org/D133036
More information about the llvm-commits
mailing list