[llvm-bugs] [Bug 22640] r217953 degraded lsr optimization at -O3 for -march=nehalem in SciMark2's Sparse matmult benchmark

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=22640

Jack Howarth  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jack Howarth  ---
Clang 3.8 RC1 on Nehalem now produces Sparse matmult results within 2% of the
that from Clang 3.5.1.

clang 3,8 RC11183.13+/-0.46

Interestingly, passing "-mllvm -disable-lsr" in addition to "-O3 -march=native"
now heavily regresses the benchmark in Clang 3.8 RC1.

clang 3.8 RC1 579.23+/-7.51
with "-mllvm -disable-lsr"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26269] New: Quick sort return false result

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26269

Bug ID: 26269
   Summary: Quick sort return false result
   Product: libc++
   Version: 3.8
  Hardware: Macintosh
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: teg...@live.cn
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
Classification: Unclassified

I wrote a code like that:

#include 
#include 
#include 
#include 
#include 
#define x first
#define y second
#define mk make_pair
using namespace std;
const int SIZE = 1010;
const double Eps = 1e-6;
typedef pairII;
II orig;
II data[SIZE];
int N;
void Read() {
scanf("%d", &N);
for (int i = 1; i <= N; i++)
scanf("%lf%lf", &data[i].x, &data[i].y);
}
II operator -(II A, II B){return mk(A.x - B.x, A.y - B.y);}
II operator +(II A, II B){return mk(A.x + B.x, A.y + B.y);}
II operator *(II A, double k){return mk(A.x * k, A.y * k);}
double calc_length(II A){return sqrt(A.x * A.x + A.y * A.y);}
double pd(double x) {
if (x > Eps)return 1;
if (x < -Eps)   return -1;
return 0;
}
int Get_quadrant(II A) {
if (pd(A.x) > 0 && pd(A.y) >= 0)return 1;   //[0, 90)
if (pd(A.x) <= 0 && pd(A.y) > 0)return 2;   //[90, 180)
if (pd(A.x) < 0 && pd(A.y) <= 0)return 3;   //[180, 270)
if (pd(A.x) >= 0 && pd(A.y) < 0)return 4;   //[270, 360)
return 0;
}
double cross(II p0, II p1, II p2) {
return (p1.x - p0.x) * (p2.y - p0.y) -
(p2.x - p0.x) * (p1.y - p0.y);
}
bool polar_angle_cmp(II A, II B) {
if (pd(A.x - orig.x) == 0 && pd(A.y - orig.y) == 0) return true;
if (pd(B.x - orig.x) == 0 && pd(B.y - orig.y) == 0) return false;

int t1 = Get_quadrant(A - orig);
int t2 = Get_quadrant(B - orig);
if (t1 != t2)   return t1 < t2;

double sum = cross(orig, A, B);
if (pd(sum) != 0)   return (pd(sum) > 0);
return calc_length(A - orig) < calc_length(B - orig);
}
bool cmp2(const int &A, const int &B) {
return A <= B;
}
int main() {
//freopen("t.in", "r", stdin);
//freopen("t.out", "w", stdout);
Read();
orig.x = orig.y = 0;
sort(data + 1, data + 1 + N, polar_angle_cmp);

for (int i = 1; i <= N; i++)
printf("%lf %lf\n", data[i].x, data[i].y);

return 0;
}

My input is as followed:

21
6 3
8 4
0 3
0 6
0 0
-1 3
-3 1
0 0
-2 0
0 0
-3 -2
-1 -3
0 -3
2 -3
0 0
3 -3
1 0
0 0
0 0
5 2
4 2

My ideal output should be:

0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
1.00 0.00
5.00 2.00
4.00 2.00
6.00 3.00
8.00 4.00
0.00 3.00
0.00 6.00
-1.00 3.00
-3.00 1.00
-2.00 0.00
-3.00 -2.00
-1.00 -3.00
0.00 -3.00
2.00 -3.00
3.00 -3.00

1.00 0.00 is after 0.00 0.00,
however, I got this when I compiled with libc++:

0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
1.00 0.00 //strange line
0.00 0.00 
5.00 2.00
4.00 2.00
6.00 3.00
8.00 4.00
0.00 3.00
0.00 6.00
-1.00 3.00
-3.00 1.00
-2.00 0.00
-3.00 -2.00
-1.00 -3.00
0.00 -3.00
2.00 -3.00
3.00 -3.00

Could you please fix it?

Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26271] New: erroneous error of circular inheritance

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26271

Bug ID: 26271
   Summary: erroneous error of circular inheritance
   Product: clang
   Version: 3.7
  Hardware: Macintosh
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: C++11
  Assignee: unassignedclangb...@nondot.org
  Reporter: hui...@me.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Classification: Unclassified

I could be wrong but I don't think the following code has circular inheritance.
And gcc6 compiles it just fine.

#include 
#include 

enum color
{
   red,
   green,
   yellow
};

enum shape
{
   circle,
   square
};

template < color... c >
using colors = std::integer_sequence;

template < shape... s >
using shapes = std::integer_sequence;

template < color, shape >
struct object
{};

template < typename, typename >
struct objects;

template < color c, shape s >
struct objects,shapes>
 : object
{};

template < color c, shape... s >
struct objects,shapes>
 : object...
{};

template < color... c, shape... s >
struct objects, shapes>
 : objects,shapes>...
{};

int main(int argc, const char * argv[])
{
   objects,shapes> x;
   object& r = x;
   (void)r;
}


clang++-mp-3.7 -std=c++1z main.cpp
main.cpp:42:4: error: circular inheritance between 'objects,
shapes >' and 'objects, integer_sequence >'
 : objects,shapes>...
   ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26269] Quick sort return false result

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26269

Richard Smith  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||richard-l...@metafoo.co.uk
 Resolution|--- |INVALID

--- Comment #1 from Richard Smith  ---
polar_angle_cmp is not a strict weak order. For instance, polar_angle_cmp(orig,
orig) returns true. (Your use of 'pd' would also stop this from being a strict
weak order, but the problem case doesn't arise in your testcase because 'pd' is
never passed a number whose absolute value is less than Eps and nonzero).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26277] New: [libc++][mips] ~35 diagnostic tests fail because errors do not prevent GAS being called (and one other reason)

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26277

Bug ID: 26277
   Summary: [libc++][mips] ~35 diagnostic tests fail because
errors do not prevent GAS being called (and one other
reason)
   Product: libc++
   Version: 3.8
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: daniel.sand...@imgtec.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
Classification: Unclassified

This failure is a representative example for Mips:
libc++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp

One workaround seems to be adding -fintegrated-as but there's presumably a bug
in clang that this leaves unaddressed.

In addition, when I tried -save-temps, the verifier failed to find error
messages due to line wrapping caused by long paths. For example:
/scratch/mipssw1erpro002/das-local/llvm-3.8/release/rc1/libcxx.src/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp:32:9:
error: 
  call to deleted function 'cref'
cref(std::get<0>(tup4()));  // expected-error {{call to deleted
function 'cref'}}
^~~~

error: 'error' diagnostics expected but not seen:
  File
/scratch/mipssw1erpro002/das-local/llvm-3.8/release/rc1/libcxx.src/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp
Line 32: call to deleted function 'cref'

With a shorter filename, both parts appear on the same line and the verifier
doesn't report failure.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 26278] New: compiler-rt adds a tsan version of libc++ without checking whether tsan is supported

2016-01-23 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26278

Bug ID: 26278
   Summary: compiler-rt adds a tsan version of libc++ without
checking whether tsan is supported
   Product: compiler-rt
   Version: 3.8
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: compiler-rt
  Assignee: unassignedb...@nondot.org
  Reporter: daniel.sand...@imgtec.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

This causes the tsan'd libcxx configure step to fail on Mips since
-fsanitize=thread is not accepted on MIPS32.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs