[llvm-bugs] [Bug 43730] New: Incorrect 'icmp sle' -> 'icmp slt' w/ vectors
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Oct 20 04:30:02 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43730
Bug ID: 43730
Summary: Incorrect 'icmp sle' -> 'icmp slt' w/ vectors
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Keywords: miscompilation
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: nunoplopes at sapo.pt
CC: lebedev.ri at gmail.com, llvm-bugs at lists.llvm.org,
regehr at cs.utah.edu, spatel+llvm at rotateright.com
This transformation exposed in Transforms/InstCombine/icmp-vec.ll is incorrect.
The issue is that "INT_MIN <= undef" is not the same as "INT_MIN < undef".
define <2 x i1> @PR27756_2(<2 x i8> %a) {
%cmp = icmp sle <2 x i8> %a, { undef, 0 }
ret <2 x i1> %cmp
}
=>
define <2 x i1> @PR27756_2(<2 x i8> %a) {
%cmp = icmp slt <2 x i8> %a, { undef, 1 }
ret <2 x i1> %cmp
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
<2 x i8> %a = < #x80 (128, -128), #x80 (128, -128) >
Source:
<2 x i1> %cmp = < #x1 (1), #x1 (1) >
Target:
<2 x i1> %cmp = < #x0 (0), #x1 (1) >
Source value: < #x1 (1), #x1 (1) >
Target value: < #x0 (0), #x1 (1) >
--
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/20191020/5684073e/attachment.html>
More information about the llvm-bugs
mailing list