[Bug middle-end/90768] New: better range analysis for converting lt/gt into bit tests
slandden at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 5 22:22:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90768
Bug ID: 90768
Summary: better range analysis for converting lt/gt into bit
tests
Product: gcc
Version: 8.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: slandden at gmail dot com
Target Milestone: ---
Converting the >= 8 to a & 8 results in one less instruction on power 9
https://godbolt.org/z/0QPN3z
#include <stdint.h>
#include <stdlib.h>
int bcmp_2(char *a, char *b, size_t s) {
if (s < 16) {
if (s >= 8)
if (*(uint64_t *)a != *(uint64_t *)b)
return 1;
}
}
More information about the Gcc-bugs
mailing list