summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2018-07-12 23:55:20 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2018-07-12 23:55:20 +0000
commitc63b492bcdf2dd73b836e357cc7bc9fa02a69c00 (patch)
tree39cbb920c4bf881f713344a3d183b9dd84281598 /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
parentc379d1a424badc74906db37c6c826e5b4a155b25 (diff)
downloadbcm5719-llvm-c63b492bcdf2dd73b836e357cc7bc9fa02a69c00.tar.gz
bcm5719-llvm-c63b492bcdf2dd73b836e357cc7bc9fa02a69c00.zip
Simplify recursive launder.invariant.group and strip
Summary: This patch is crucial for proving equality laundered/stripped pointers. eg: bool foo(A *a) { return a == std::launder(a); } Clang with -fstrict-vtable-pointers will emit something like: define dso_local zeroext i1 @_Z3fooP1A(%struct.A* %a) { entry: %c = bitcast %struct.A* %a to i8* %call = tail call i8* @llvm.launder.invariant.group.p0i8(i8* %c) %0 = bitcast %struct.A* %a to i8* %1 = tail call i8* @llvm.strip.invariant.group.p0i8(i8* %0) %2 = tail call i8* @llvm.strip.invariant.group.p0i8(i8* %call) %cmp = icmp eq i8* %1, %2 ret i1 %cmp } and because %2 can be replaced with @llvm.strip.invariant.group(%0) and that %2 and %1 will produce the same value (because strip is readnone) we can replace compare with true. Reviewers: rsmith, hfinkel, majnemer, amharc, kuhar Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D47423 llvm-svn: 336963
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud