[llvm-bugs] [Bug 27538] Some type_traits return incorrect values when used by gcc

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27538

Eric Fiselier  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Eric Fiselier  ---
So the "std::is_trivally_*" traits require compiler support. libc++ tries it's
best to emulate the traits when the builtin's aren't available, but it's less
than perfect.

The provided reproducer works for *all* GCC versions with the builtin's (GCC >=
5.1) and only fails for older GCC versions (or older libc++ versions).
Unfortunately there isn't much I can do about that.

I'm closing this bug as "INVALID" since it works for ToT libc++ + new GCC.
Please reopen this if you disagree.

-- 
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 27397] Deprecate and remove C++03 support for INVOKE and function.

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27397

Eric Fiselier  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Eric Fiselier  ---
Closing this as INVALID since @mclow suggested that removing these functions
would break user code.

-- 
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 16748] [backend] Do not know how to split the result of this operator

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=16748

Simon Pilgrim  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||llvm-...@redking.me.uk
 Resolution|--- |DUPLICATE

--- Comment #6 from Simon Pilgrim  ---
Duplicate of PR16133, fixed in r253773

*** This bug has been marked as a duplicate of bug 16133 ***

-- 
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 27538] Some type_traits return incorrect values when used by gcc

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27538

tsniatowski  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

-- 
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 24738] Loop vectorizer introduces bad "undef"

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=24738

Mattias Eriksson  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #7 from Mattias Eriksson  ---
(In reply to comment #6)
> Ah, I see now, I thought opt was failing. Do you by any chance have less
> simplified example? I can see that this might be an issue, but I suspect
> that the rootcause might be somewhere else and to verify it it would be
> super helpful to have a test that really exposes a bug (in the current
> reproducer the undef value doesn't matter as we never take the corresponding
> edge).

Unfortunately I do not have saved the original problem. I remember that I found
it in randomized testing and that it was rare. I also remember that it was a
real wrong-code error that I had to spend a day or so to track down.

I will try to make an effort in finding a "real" error again by running some
more randomized testing during the weekend.

-- 
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 27572] New: --reproduce doesn't rewrite the command line

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27572

Bug ID: 27572
   Summary: --reproduce doesn't rewrite the command line
   Product: lld
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedb...@nondot.org
  Reporter: rafael.espind...@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

For example, I see
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../../lib64/crt1.o in it. crt1.o
was copied, so the command line should have been update to use that one.

-- 
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 27573] New: Avoid partial SSE register stall

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27573

Bug ID: 27573
   Summary: Avoid partial SSE register stall
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: hjl.to...@gmail.com
CC: david.l.kreit...@intel.com, llvm-bugs@lists.llvm.org,
zia.ans...@intel.com
Classification: Unclassified

[hjl@gnu-6 pr57954]$ cat x.c
float
foo1 (int x)
{
  return x;
}

double
foo2 (int x)
{
  return x;
}

float
foo3 (long long int x)
{
  return x;
}

double
foo4 (long long int x)
{
  return x;
}
[hjl@gnu-6 pr57954]$  gcc -S -O2 -mtune=haswell x.c
[hjl@gnu-6 pr57954]$ cat x.s
.file"x.c"
.section.text.unlikely,"ax",@progbits
.LCOLDB0:
.text
.LHOTB0:
.p2align 4,,15
.globlfoo1
.typefoo1, @function
foo1:
.LFB0:
.cfi_startproc
pxor%xmm0, %xmm0
cvtsi2ss%edi, %xmm0
ret
.cfi_endproc
.LFE0:
.sizefoo1, .-foo1
.section.text.unlikely
.LCOLDE0:
.text
.LHOTE0:
.section.text.unlikely
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globlfoo2
.typefoo2, @function
foo2:
.LFB1:
.cfi_startproc
pxor%xmm0, %xmm0
cvtsi2sd%edi, %xmm0
ret
.cfi_endproc
.LFE1:
.sizefoo2, .-foo2
.section.text.unlikely
.LCOLDE1:
.text
.LHOTE1:
.section.text.unlikely
.LCOLDB2:
.text
.LHOTB2:
.p2align 4,,15
.globlfoo3
.typefoo3, @function
foo3:
.LFB2:
.cfi_startproc
pxor%xmm0, %xmm0
cvtsi2ssq%rdi, %xmm0
ret
.cfi_endproc
.LFE2:
.sizefoo3, .-foo3
.section.text.unlikely
.LCOLDE2:
.text
.LHOTE2:
.section.text.unlikely
.LCOLDB3:
.text
.LHOTB3:
.p2align 4,,15
.globlfoo4
.typefoo4, @function
foo4:
.LFB3:
.cfi_startproc
pxor%xmm0, %xmm0
cvtsi2sdq%rdi, %xmm0
ret
.cfi_endproc
.LFE3:
.sizefoo4, .-foo4
.section.text.unlikely
.LCOLDE3:
.text
.LHOTE3:
.ident"GCC: (GNU) 5.3.1 20160406 (Red Hat 5.3.1-6)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr57954]$
/export/build/gnu/llvm-clang-x32-bootstrap/stage1/build-x86_64-linux-gnux32/bin/clang
-S -O2  -mtune=haswell x.c
[hjl@gnu-6 pr57954]$ cat x.s
.text
.file"x.c"
.globlfoo1
.p2align4, 0x90
.typefoo1,@function
foo1:   # @foo1
.cfi_startproc
# BB#0:
cvtsi2ssl%edi, %xmm0
retq
.Lfunc_end0:
.sizefoo1, .Lfunc_end0-foo1
.cfi_endproc

.globlfoo2
.p2align4, 0x90
.typefoo2,@function
foo2:   # @foo2
.cfi_startproc
# BB#0:
cvtsi2sdl%edi, %xmm0
retq
.Lfunc_end1:
.sizefoo2, .Lfunc_end1-foo2
.cfi_endproc

.globlfoo3
.p2align4, 0x90
.typefoo3,@function
foo3:   # @foo3
.cfi_startproc
# BB#0:
cvtsi2ssq%rdi, %xmm0
retq
.Lfunc_end2:
.sizefoo3, .Lfunc_end2-foo3
.cfi_endproc

.globlfoo4
.p2align4, 0x90
.typefoo4,@function
foo4:   # @foo4
.cfi_startproc
# BB#0:
cvtsi2sdq%rdi, %xmm0
retq
.Lfunc_end3:
.sizefoo4, .Lfunc_end3-foo4
.cfi_endproc


.ident"clang version 3.9.0 (http://llvm.org/git/clang.git
3e732e176f38a3cd18520fea2dcda89572736d9d) (http://llvm.org/git/llvm.git
9c55c367aecce3a03ecf8dde49b2d38508ff2640)"
.section".note.GNU-stack","",@progbits
[hjl@gnu-6 pr57954]$ 

Clang should also generate "pxor %xmm0, %xmm0" to avoid partial SSE
register stall.

-- 
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 27574] New: SPEC cpu2006 444.namd fails with verification error (PPC)

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27574

Bug ID: 27574
   Summary: SPEC cpu2006 444.namd fails with verification error
(PPC)
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Backend: PowerPC
  Assignee: unassignedb...@nondot.org
  Reporter: aravi...@in.ibm.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

runs fine with O2 but gives a VE with O3 
Problem does not show up if vsx is disabled

-- 
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 27550] [ARM] fp16 neon intrinsics are available even if the target doesn't support fp16

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27550

Silviu Baranga  changed:

   What|Removed |Added

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

--- Comment #1 from Silviu Baranga  ---
Fixed in r268047.

-- 
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 24362] compiler fails with 'segmentation fault' after a nested return of lambda functions on Windows

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=24362

Andrey Kuleshov  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrey Kuleshov  ---
This cannot be reproduced with latest clang.
Seems to be already fixed.

-- 
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 26942] r263424 causes crash during selfhost.

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=26942

Amjad Aboud  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Amjad Aboud  ---
Fixed in revisions: 267004
Recommitted in revisions: (LLVM) 268054, (Clang) 268055

-- 
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 27575] New: miscompile of select at O1

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27575

Bug ID: 27575
   Summary: miscompile of select at O1
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: k...@google.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

#include 
int main(int argc, char **argv) {
  int i = argc - 1;
  int a = 1 << i;
  int b = a >> 1;
  double c = b > 0 ? (double)b : 0.5;
  printf("%d %g\n", b, c);
}


for f in 0 1 2; do clang++  -O$f  bug.cc && ./a.out ; done
0 0.5
0 0
0 0


This is what I see in IR: 

*** IR Dump After Dead Argument Elimination ***; ModuleID = 'bug.cc'
  %cond = select i1 %cmp, double %conv, double 5.00e-01

*** IR Dump After Combine redundant instructions ***
  %1 = select i1 %0, i32 %shr, i32 0


I don't see how this transformation could be legal.

-- 
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 2390] LLVM doesn't match the x86 linux calling convention for sse vectors

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=2390

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||hjl.to...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #2 from H.J. Lu  ---


*** This bug has been marked as a duplicate of bug 21510 ***

-- 
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 13191] cmake build doesn't support enabling expensive checks

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=13191

Filipe Cabecinhas  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED
 CC||fil...@gmail.com
 Resolution|WONTFIX |FIXED

--- Comment #6 from Filipe Cabecinhas  ---
I added a cmake option (LLVM_ENABLE_EXPENSIVE_CHECKS) for this in r268050,
prompted by this email about the test suite failing when *part of* the
expensive checks are enabled.
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098621.html

-- 
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 27575] miscompile of select at O1

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27575

David Majnemer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|new bugs|Scalar Optimizations
 Resolution|--- |FIXED
   Assignee|unassignedb...@nondot.org   |david.majne...@gmail.com
Product|new-bugs|libraries

--- Comment #3 from David Majnemer  ---
Fixed in r268086.

-- 
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 27576] New: Clang compiler segmentation fault

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27576

Bug ID: 27576
   Summary: Clang compiler segmentation fault
   Product: clang
   Version: 3.5
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: C++14
  Assignee: unassignedclangb...@nondot.org
  Reporter: patr...@foreflight.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Per the crash instructions, I'm submitting this info here.

0  libLLVM-3.5.so  0x7efed760f4b2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.5.so  0x7efed760f29c
2  libpthread.so.0 0x7efed637a100
3  clang   0x00c52bfb
4  clang   0x00c533a5
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 1125
5  clang   0x00bb9ab8
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef, clang::OverloadCandidateSet&, bool) + 392
6  clang   0x00b5a879
7  clang   0x00b5ace6
8  clang   0x00b62aa9
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef, bool) + 2665
9  clang   0x00b63293
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef, bool) + 403
10 clang   0x00b34a28
11 clang   0x00b36522
clang::Sema::BuildTypeTrait(clang::TypeTrait, clang::SourceLocation,
llvm::ArrayRef, clang::SourceLocation) + 178
12 clang   0x00c6ea68
13 clang   0x00c6fc05
14 clang   0x00c7a189
15 clang   0x00c7c57e
16 clang   0x00c6c62c
17 clang   0x00c6d09a
18 clang   0x00c6d1bb
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 91
19 clang   0x00c6d627
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 1079
20 clang   0x00c712ac
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 700
21 clang   0x00c7263d
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 2029
22 clang   0x00cb4721
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1793
23 clang   0x00cb4a65
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 21
24 clang   0x009a3d6b
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 219
25 clang   0x00b060c5
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&, bool, clang::TypeSourceInfo**) + 85
26 clang   0x00c82fe6
27 clang   0x00c8305d
28 clang   0x00c6fa5a
29 clang   0x00c7a189
30 clang   0x00c7c57e
31 clang   0x00c6c62c
32 clang   0x00c6d09a
33 clang   0x00c6d1bb
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 91
34 clang   0x00c6d627
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 1079
35 clang   0x00c712ac
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 700
36 clang   0x00c7263d
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 2029
37 clang   0x00cb4721
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1793
38 clang   0x00cb4a65
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 21
39 clang   0x009a3d6b
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 219
40 clang   0x00b060c5

[llvm-bugs] [Bug 27577] New: Inefficient code gen for cmove

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27577

Bug ID: 27577
   Summary: Inefficient code gen for cmove
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: LLVM Codegen
  Assignee: unassignedclangb...@nondot.org
  Reporter: hjl.to...@gmail.com
CC: david.l.kreit...@intel.com, llvm-bugs@lists.llvm.org,
zia.ans...@intel.com
Classification: Unclassified

On x86-64, at -O2, for

---
extern int a, b;

int foo(int cond)
{
   return cond == -1 ? a : b;
}
---

clang 3.7 and 3.9 generate

---
cmpl$-1, %edi
movl$a, %eax
movl$b, %ecx
cmoveq%rax, %rcx
movl(%rcx), %eax
retq
---

---
cmpl$-1, %edi
movla(%rip), %eax
cmovneb(%rip), %eax
ret
---

is better.

-- 
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 27576] Clang compiler segmentation fault

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27576

Patrick Dolan  changed:

   What|Removed |Added

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

--- Comment #4 from Patrick Dolan  ---
Compiled 3.6.1 from scratch and the problem did not occur. Must be an older bug
that's already fixed.

-- 
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 27578] New: SelectInst::Create will crash when give name without giving insert point

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27578

Bug ID: 27578
   Summary: SelectInst::Create will crash when give name without
giving insert point
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: Core LLVM classes
  Assignee: unassignedb...@nondot.org
  Reporter: tristan@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Code below will get an error, which is unexpected 

  BasicBlock *entry = BasicBlock::Create(Context, "", maxFunction);
  Argument *Arg1 = &*iter;
  iter++;
  Argument *Arg2 = &*iter;
  Value *Compare = Builder.CreateICmpULT(Arg1, Arg2, "c");
  SelectInst *Select  = SelectInst::Create(Compare,
Arg1, Arg2, "p1.p2");

Error is
While deleting: i1 %c
Use still stuck around after Def is destroyed:  %p1.p2 = select i1 %c, i32 %p1,
i32 %p2
Assertion failed: (use_empty() && "Uses remain when a value is destroyed!"),
function ~Value, file /Users/hyan/code/llvm/llvm/lib/IR/Value.cpp, line 85.
Abort trap: 6

We have two static Create method for SelectInst
static SelectInst *Create(Value *C, Value *S1, Value *S2, const Twine &NameStr
= "", Instruction *InsertBefore = nullptr)
static SelectInst *Create(Value *C, Value *S1, Value *S2, const Twine &NameStr,
BasicBlock *InsertAtEnd)

First Create function should behave as InsertBefore to current insert point
even it's a nullptr. Otherwise this method will be useless.

Workaround for this is using second Create function
  SelectInst *Select  = SelectInst::Create(Compare,
Arg1, Arg2, "p1.p2", entry);

-- 
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 27579] New: Assertion failed: (Cu && "We should not have orphaned DIEs.")

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27579

Bug ID: 27579
   Summary: Assertion failed: (Cu && "We should not have orphaned
DIEs.")
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: DebugInfo
  Assignee: unassignedb...@nondot.org
  Reporter: h...@chromium.org
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

This happens when building Chrome for iOS with tip-of-tree Clang.

FAILED: obj/breakpad/src/client/mac/handler/breakpad_client.dynamic_images.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF
obj/breakpad/src/client/mac/handler/breakpad_client.dynamic_images.o.d
-DV8_DEPRECATION_WARNINGS -DDISABLE_NACL -DCHROMIUM_BUILD
-DCR_CLANG_REVISION=268086 -DUSE_LIBJPEG_TURBO=1 -DFIELDTRIAL_TESTING_ENABLED
-DDISABLE_FTP_SUPPORT=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSE_LIBPCI=1 -DNDEBUG
-DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNS_BLOCK_ASSERTIONS=1 -Igen
-I../../breakpad/src -I../../breakpad/src/client/mac/Framework
-I../../breakpad/src/common/mac -isysroot
/Applications/Xcode7.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk
-Os -gdwarf-2 -fvisibility=hidden -Werror -miphoneos-version-min=9.0 -arch
armv7 -Wall -Wno-unused-parameter -Wno-missing-field-initializers
-Wno-selector-type-mismatch -Wheader-hygiene -Wno-char-subscripts
-Wno-unneeded-internal-declaration -Wno-covered-switch-default
-Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register
-Wno-inconsistent-missing-override -Wno-shift-negative-value
-Wno-undefined-var-template -Wno-unused-variable -Wno-deprecated-declarations
-std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden
-fno-threadsafe-statics -fcolor-diagnostics  -c
../../breakpad/src/client/mac/handler/dynamic_images.cc -o
obj/breakpad/src/client/mac/handler/breakpad_client.dynamic_images.o
Assertion failed: (Cu && "We should not have orphaned DIEs."), function
getUnit, file
/b/build/slave/ClangToTiOS/build/src/third_party/llvm/lib/CodeGen/AsmPrinter/DIE.cpp,
line 122.
0  clang-3.90x000106ca929b
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  clang-3.90x000106ca84b6 llvm::sys::RunSignalHandlers() +
70
2  clang-3.90x000106ca9abf abort + 767
3  libsystem_platform.dylib 0x7fff8e369f1a _sigtramp + 26
4  clang-3.90x000109073b81 clang::Stmt::StatisticsEnabled +
219521
5  clang-3.90x000106ca97d6 abort + 22
6  clang-3.90x000106ca97b1 __assert_rtn + 81
7  clang-3.90x0001072256fe llvm::DIE::getUnit() const + 78
8  clang-3.90x00010722db0c
llvm::DwarfAccelTable::EmitData(llvm::AsmPrinter*, llvm::DwarfDebug*) + 396
9  clang-3.90x00010722dd91
llvm::DwarfAccelTable::emit(llvm::AsmPrinter*, llvm::MCSymbol const*,
llvm::DwarfDebug*) + 289
10 clang-3.90x00010723b3ef llvm::DwarfDebug::endModule() +
847
11 clang-3.90x000107215869
llvm::AsmPrinter::doFinalization(llvm::Module&) + 873
12 clang-3.90x00010687d660
llvm::FPPassManager::doFinalization(llvm::Module&) + 80
13 clang-3.90x00010687dbdd
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1325
14 clang-3.90x000106e2f978
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) + 11432
15 clang-3.90x000106e2cdda
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) + 266
16 clang-3.90x000106fd539b
clang::EmitObjAction::EmitObjAction(llvm::LLVMContext*) + 1547
17 clang-3.90x00010777ee75 clang::ParseAST(clang::Sema&,
bool, bool) + 581
18 clang-3.90x0001071b74ab clang::FrontendAction::Execute()
+ 75
19 clang-3.90x00010717c3a1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1073
20 clang-3.90x0001071fb739
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4713
21 clang-3.90x0001059048fd cc1_main(llvm::ArrayRef, char const*, void*) + 1373
22 clang-3.90x000105903300 main + 11776
23 libdyld.dylib0x7fff86f335c9 start + 1
Stack dump:
0.Program arguments:
/b/build/slave/ClangToTiOS/build/src/third_party/llvm-build/Release+Asserts/bin/clang-3.9
-cc1 -triple thumbv7-apple-ios9.0.0 -emit-obj -disable-free -main-file-name
dynamic_images

[llvm-bugs] [Bug 27515] TestBitfields hits assert on OS X: Assertion failed: (Offset >= Size), function insertPadding, CGRecordLayoutBuilder.cpp

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27515

Greg Clayton  changed:

   What|Removed |Added

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

--- Comment #6 from Greg Clayton  ---
Fixed with:

% svn commit
Sendingpackages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
Sendingsource/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Transmitting file data ..
Committed revision 268110.

-- 
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 27580] New: wrong code at -O2 and above in 32-bit mode on x86_64-linux-gnu

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27580

Bug ID: 27580
   Summary: wrong code at -O2 and above in 32-bit mode on
x86_64-linux-gnu
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: chengnian...@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

The following code is miscompiled by the trunk at -O2 and above in 32-bit mode
(not 64-bit mode) on x86_64-linux-gnu.




$: clang-trunk -v
clang version 3.9.0 (trunk 268002)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.4
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$: 
$: clang-trunk -m32 -O2 -w small.c ; timeout -s 9 10 ./a.out
Killed
$: clang-trunk -m32 -O1 -w small.c ; timeout -s 9 10 ./a.out
$: 
$: cat small.c
int a;
long long b = 3;
short c, d;
char e, f;
char fn1(char p1, char p2) { return p1 * p2; }

char fn2(int p1, int p2) { return p1 ? p1 : p1 >> p2; }

void fn3() {
  f = fn1(b, b);
  short g;
  unsigned long long h = b;
  int j, k = fn2(f - ((d = (g = h > 1) <= 7 != h & c) < 40), 2), l = fn2(k, 7),
 i = 0;
  for (; i < 2; i++)
j = g && g - a ? g : g + a;
  e = l & j;
  if (e)
for (;;)
  ;
}

int main() {
  fn3();
  return 0;
}
$:

-- 
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 27581] New: null sanitizer emits too many checks

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27581

Bug ID: 27581
   Summary: null sanitizer emits too many checks
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: nlewy...@google.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Testcase for things that should have checks with -fsanitize=null and things
that should not:

struct X {
  void nocheck(X &);
  void method();
  int i;
};
int &getref();
void intasptr(int *);

void check(X *ptr) {
  ptr->method();
  (*ptr).method();
  intasptr(&ptr->i);
  ptr->i++;
}

void X::nocheck(X &ref) {
  ref.method();  // has extra check
  method();  // has extra check
  intasptr(&ref.i);
  intasptr(&i);  // has extra check
  ref.i++;
  i++;  // has extra check

  intasptr(&getref());
}

The checks commented as being extra are ones which would have been caught by
-fsanitize=null when attempting to construct this situation, therefore they
would lead to duplicate error emission. Fixing these is desirable to reduce the
compile time and code size impact of the null sanitizer.

There's one other case I didn't list, "(&ref)->method();" which has an extra
check. That could go either way really, it happens to be impossible to be null
but that could be emitted by the sanitizer and left to the optimizer, or if
clang finds it easy enough to locally show that it's non-null, that works too.

-- 
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 27582] New: ARM64: Backend should know about implicit masking of variable shift distances

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27582

Bug ID: 27582
   Summary: ARM64: Backend should know about implicit masking of
variable shift distances
   Product: libraries
   Version: 3.8
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: Backend: AArch64
  Assignee: unassignedb...@nondot.org
  Reporter: fabi...@radgametools.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 16281
  --> https://llvm.org/bugs/attachment.cgi?id=16281&action=edit
Repro C file

ARM64 ASRV, LSLV, LSRV, RORV are specified in the ARMv8 ARM as interpreting the
shift distance "MOD datasize", that is, modulo 32 for 32-bit shifts and modulo
64 for 64-bit shifts.

Since C/C++ shifts larger than the register width are UB, it is desirable that
the (well-defined, portable) alternatives "x >> (y & 31)" (32-bit x) and "x >>
(y & 63)" (64-bit x) not generate an extra "and", but as of Clang-3.8 they do.

Trivial reproducer is attached: "clang -O2 -c -S -target arm64-apple-darwin
test.c".

The expected result is for f to generate "lsr w0, w0, w1; ret" and g "lsr x0,
x0, x1; ret", but with Clang-3.8 explicit ANDs are present.

-- 
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 27583] New: class result are different when using clang in my machine and C++ in ideone.com

2016-04-29 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=27583

Bug ID: 27583
   Summary: class result are different when using clang in my
machine and C++ in ideone.com
   Product: clang
   Version: unspecified
  Hardware: PC
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: C++11
  Assignee: unassignedclangb...@nondot.org
  Reporter: dna...@foxmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 16282
  --> https://llvm.org/bugs/attachment.cgi?id=16282&action=edit
This is a C++ program for bigInt but have different result while using clang in
my machine and C++ in ideone.com

-- 
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