https://bugs.llvm.org/show_bug.cgi?id=39046
Bug ID: 39046
Summary: SimplifyCFG.cpp fails to build lookup tables in many
cases
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
https://godbolt.org/z/QuklOn
#include <stdio.h>
int switchexample(unsigned char num) {
switch(num) {
case 0:
return 120;
case 1:
return 119;
case 3:
return 118;
case 4:
return 118;
case 11:
return 117;
case 12:
return 116;
case 13:
return 115;
case 14:
return 114;
case 15:
return 113;
case 16:
return 112;
case 17:
return 111;
case 18:
return 110;
case 19:
return 109;
case 37: //change this to 36 and it will use a lookup table
return 108;
case 35:
return 108;
default:
puts("hi");
return 1;
}
}
Noticed while working on 39013
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs