[all-commits] [llvm/llvm-project] a2ccd5: [FunctionAttrs] Fix incorrect noundef inference wi...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Apr 22 22:26:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a2ccd5d88ffa8a730914c608601e1e3f7785cb08
https://github.com/llvm/llvm-project/commit/a2ccd5d88ffa8a730914c608601e1e3f7785cb08
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
M llvm/lib/Transforms/IPO/FunctionAttrs.cpp
M llvm/test/Transforms/FunctionAttrs/noundef.ll
Log Message:
-----------
[FunctionAttrs] Fix incorrect noundef inference with poison attrs (#89348)
Currently, when inferring noundef, we only check that the return value
is not undef/poison. However, we fail to account for the possibility
that a poison-generating return attribute will convert the value to
poison, and then violate the noundef attribute, resulting in immediate
UB.
For the relevant return attributes (align, nonnull and range), check
whether we can trivially re-prove the relevant property, otherwise do
not infer noundef.
This fixes the FunctionAttrs side of
https://github.com/llvm/llvm-project/issues/88026.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list