[llvm-bugs] [Bug 35846] New: [InstCombine] Compare known true or false was not folded
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jan 7 02:14:51 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=35846
Bug ID: 35846
Summary: [InstCombine] Compare known true or false was not
folded
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, david.majnemer at gmail.com,
davide at freebsd.org, djasper at google.com,
llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com
Reduced from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4718
opt -instcombine
define i32 @bar4(i32 %a, i32 %b) {
%and1 = and i32 %b, 3
%B1 = ashr i32 %and1, %and1
%B3 = shl i32 %and1, %B1
%cmp = icmp eq i32 %B3, 1
tail call void @llvm.assume(i1 %cmp)
%cmp2 = icmp eq i32 %B1, %B3
tail call void @llvm.assume(i1 %cmp2)
ret i32 %and1
}
declare void @llvm.assume(i1)
Assertion failed: C.ashr(*ShiftAmt).shl(*ShiftAmt) == C && "Compare known true
or false was not folded", file
C:\LLVM\llvm\lib\Transforms\InstCombine\InstCombineCompares.cpp, line 1900
--
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/20180107/6152e07e/attachment-0001.html>
More information about the llvm-bugs
mailing list