[PATCH] D71799: [Attributor] AAUndefinedBehavior: Check for branches on undef value.
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 21 14:09:17 PST 2019
baziotis created this revision.
baziotis added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, jfb, hiraditya.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
A branch is considered UB if it depends on an undefined / uninitialized value.
At this point this handles the simplest possible UB branches in the form: `br i1 undef, ...`
Note that it really must `undef` there. If it is e.g.:
%cond = icmp ne i32 undef, 0
br i1 %cond, label %t, label %e
Then right now, undef is not propagated. We depend on `AAValueSimplify` for this.
So, I'm open to any suggestion as to how we can make this more sophisticated.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71799
Files:
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/undefined_behavior.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71799.235027.patch
Type: text/x-patch
Size: 7473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191221/e8cb0876/attachment.bin>
More information about the llvm-commits
mailing list