[PATCH] D52164: [InstSimplify] Fold ne/eq comparison of a pointer produced by a noalias function
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 01:28:33 PDT 2018
xbolva00 created this revision.
xbolva00 added a reviewer: spatel.
Herald added a subscriber: llvm-commits.
Example:
declare noalias i8* @malloc(i64)
define i1 @compare_noalias(i64 %x, i8* %y) {
%m = call i8* @malloc(i64 %x)
%r = icmp eq i8* %m, %y
ret i1 %r
}
In this case %r must be false because @malloc has the 'noalias' attribute.
Fixes PR38956
Repository:
rL LLVM
https://reviews.llvm.org/D52164
Files:
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/icmp-noalias-pointers.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52164.165721.patch
Type: text/x-patch
Size: 8625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/c89862b7/attachment.bin>
More information about the llvm-commits
mailing list