[llvm-bugs] [Bug 27008] New: major vectorizer performance regression from 3.7.1
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 20 20:53:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27008
Bug ID: 27008
Summary: major vectorizer performance regression from 3.7.1
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: pdknsk at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
clang version 3.7.1 (tags/RELEASE_371/final)
Target: x86_64-unknown-linux-gnu
$ clang-3.7 -march=haswell -O2 -std=c99 file.c -o file
$ ./file
1048575999 0.340
clang version 3.8.0 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
$ clang-3.8 -march=haswell -O2 -std=c99 file.c -o file
$ ./file
1048575999 0.986
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int function(const char* mem, const int x) {
int r = 0;
for (unsigned int i = 1; i < x; i++)
r += (mem[i - 1] != mem[i]);
return r;
}
int main() {
int x = 1000 << 20;
char* mem = (char*)malloc(x);
for (int y = 0; y < x; y++)
mem[y] = y & 1;
int c = clock();
int r = function(mem, x);
printf("%i %.3f\n", r, (float)(clock() - c) / CLOCKS_PER_SEC);
}
--
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/20160321/ebd944c1/attachment.html>
More information about the llvm-bugs
mailing list