[llvm-bugs] [Bug 39510] New: Incorrect optimization in InstSimplify
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 31 14:03:32 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39510
Bug ID: 39510
Summary: Incorrect optimization in InstSimplify
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Transformation Utilities
Assignee: unassignedbugs at nondot.org
Reporter: sbc at chromium.org
CC: llvm-bugs at lists.llvm.org
The following C code is (I believe) incorrectly being reduces to a constant
value:
```
int f (int a) {
a = a > 0 ? a : -a;
if (a == 2)
return 0;
else
return 1;
}
```
$ clang vrp-2.c -O1 -c -emit-llvm -S -o -
...
define dso_local i32 @f(i32 %a) local_unnamed_addr #0 {
entry:
ret i32 1
}
...
I tracked it down to this recent change:
https://reviews.llvm.org/D53844
--
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/20181031/3b7e3365/attachment.html>
More information about the llvm-bugs
mailing list