[llvm-bugs] [Bug 34415] New: Cmov regression
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 1 10:23:50 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34415
Bug ID: 34415
Summary: Cmov regression
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: babokin at gmail.com
CC: llvm-bugs at lists.llvm.org
Test cases below produce different result on -O0 and -O2. Bisection points to
cmov conversion pass. As Craig noted in #34381, this is regression after
r311226.
>cat f1.cpp
#include <stdio.h>
signed char var_48 = -43;
signed char var_2 = 56;
unsigned int var_20 = 3609732948U;
long int var_30 = 7058958203059653819L;
void foo() {
if ((6L + var_48) / 5)
var_30 = var_2 ? var_48 : var_20;
}
int main() {
foo();
printf("%ld\n", var_30);
return 0;
}
>cat f2.cpp
#include <stdio.h>
unsigned long int var_69 = 0;
unsigned long int var_26 = 2567499382298705128UL;
unsigned int var_54 = 606989740U;
unsigned int var_12 = 1622378007U;
void foo() { var_69 = var_26 ? var_54 == 0 ? var_12 : int(var_26) : 0; }
int main() {
foo();
printf("%lu\n", var_69);
return 0;
}
--
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/20170901/e7afcbd3/attachment-0001.html>
More information about the llvm-bugs
mailing list