[llvm-bugs] [Bug 37541] New: [NewGVN] assumes are optimized away
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 21 06:59:56 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37541
Bug ID: 37541
Summary: [NewGVN] assumes are optimized away
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: nikita.ppv at gmail.com
CC: llvm-bugs at lists.llvm.org
Just to make sure this is documented, NewGVN optimizes
define {}* @test({}* %arg) {
%cmp = icmp ne {}* %arg, null
call void @llvm.assume(i1 %cmp)
ret {}* %arg
}
declare void @llvm.assume(i1)
into
define {}* @test({}* %arg) {
%cmp = icmp ne {}* %arg, null
call void @llvm.assume(i1 true)
ret {}* %arg
}
declare void @llvm.assume(i1)
That is, assumes will usually be reduced to "i1 true" (unless no predicate info
is inserted). This should be prevented.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180521/8a6f84d9/attachment.html>
More information about the llvm-bugs
mailing list