[llvm-bugs] [Bug 32038] New: sumarray2d test fails with mavx flag

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32038

Bug ID: 32038
   Summary: sumarray2d test fails with mavx flag
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: santosh.zanju...@amd.com
CC: llvm-bugs@lists.llvm.org

SingleSource/Regression/C/sumarray2d test failed when compiled with O3 flto
mavx.  The test passes without mavx flag. 

I shall further try to root cause the issue / find svn revision that introduced
this issue.


Output difference:

SingleSource/Regression/C$ cat Output/sumarray2d.out-nat
Sum(Array[100,100] = 975150
exit 0
SingleSource/Regression/C$ cat Output/sumarray2d.out-simple
Sum(Array[100,100] = -14747
exit 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 28535] Preamble is also generated for the second reparse on Windows

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=28535

Erik Verbruggen  changed:

   What|Removed |Added

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

--- Comment #2 from Erik Verbruggen  ---
In the example program, the ifstream is not in binary mode. So, it will convert
\r\n to \n. So, when the preambles are compared for the unchanged case (where
the file comes from disk and contains \r\n line terminators) and the case with
unsaved files, they are of a different size because of the missing \r's. So
clang will re-generate the preamble.

So, it's not really a bug.

-- 
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 32039] New: Very slow compilation / high memory use with LoopStrengthReduce and SCEV

2017-02-22 Thread via llvm-bugs
http://bugs.llvm.org/show_bug.cgi?id=32039

Bug ID: 32039
   Summary: Very slow compilation / high memory use with
LoopStrengthReduce and SCEV
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Loop Optimizer
  Assignee: unassignedb...@nondot.org
  Reporter: jo...@netbsd.org
CC: llvm-bugs@lists.llvm.org

Created attachment 18017
  --> http://bugs.llvm.org/attachment.cgi?id=18017&action=edit
Test case

The attached test case is from Scribus. Compiling with -O2 will eat > 1GB RAM
and take a long time to compile. The semantically equivalent version with many
of the while loops replaced by plain ifs is much faster.

-- 
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 32040] New: clang-cl /? says "clang N.0.0" instead of "clang-cl N.0.0"

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32040

Bug ID: 32040
   Summary: clang-cl /? says "clang N.0.0" instead of "clang-cl
N.0.0"
   Product: clang
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Driver
  Assignee: unassignedclangb...@nondot.org
  Reporter: nicolaswe...@gmx.de
CC: llvm-bugs@lists.llvm.org

$ bin/clang-cl /? | grep USAGE
USAGE: clang-4.0 [options] 

Should be `clang-cl-4.0` or something like that.

-- 
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 32034] Assert-on-valid: "temporary created multiple times"

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32034

Richard Smith  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Smith  ---
This was broken before the constexpr if changes; it's failing now due to a
change in stack layout. The problem is that AtomicExprEvaluator does this:

  bool ZeroInitialization(const Expr *E) {
ImplicitValueInitExpr VIE(
E->getType()->castAs()->getValueType());
return Evaluate(Result, Info, &VIE);
  }

... but Evaluate uses the Expr* as a key in a map when it's creating a class
temporary. Somewhat more reduced testcase:

  struct B {};
  struct C { _Atomic(B) c; };
  constexpr int n = (C(), C(), 0);

Fixed by r295886.

-- 
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 32041] New: X86 xop.vpcmov trips assertion

2017-02-22 Thread via llvm-bugs
http://bugs.llvm.org/show_bug.cgi?id=32041

Bug ID: 32041
   Summary: X86 xop.vpcmov trips assertion
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: paul_robin...@playstation.sony.com
CC: llvm-bugs@lists.llvm.org

Created attachment 18018
  --> http://bugs.llvm.org/attachment.cgi?id=18018&action=edit
XOP intrinsics test

r295571 removed the xop.vpcmov intrinsics and added an auto-upgrade,
but we're seeing an assertion as shown below.

It looks like the vector type suffixes in general might have been missed?
I see this for .v4sf, .v2df, .v4di256, 

(We have a long test file for XOP intrinsics, which I haven't upstreamed
because I haven't had a chance to see how much duplication it has.  If
you're interested, I've attached it.)


$ cat test.ll
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

define <4 x float> @vpcmovv4sf(<4 x float> %a, <4 x float> %b, <4 x float> %c)
nounwind readnone {
  %1 = tail call <4 x float> @llvm.x86.xop.vpcmov.v4sf(<4 x float> %a, <4 x
float> %b, <4 x float>
%c)
  ret <4 x float> %1
}

declare <4 x float> @llvm.x86.xop.vpcmov.v4sf(<4 x float>, <4 x float>, <4 x
float>) nounwind
readnone

$ llc test.ll
llc: /home/russell/git/o/llvm/lib/IR/Instructions.cpp:2080: void
llvm::BinaryOperator::init(llvm::Instruction::BinaryOps): Assertion
`(getType()->isIntegerTy() ||
(getType()->isVectorTy() &&
cast(getType())->getElementType()->isIntegerTy())) &&
"Tried to create a logical operation on a non-integral type!"' failed.

-- 
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 31439] LLVM consider GEP(a + i - 1) could not be zero

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31439

Eli Friedman  changed:

   What|Removed |Added

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

--- Comment #7 from Eli Friedman  ---
r295916.

-- 
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 32042] New: conflicting debug info for argument in windows chromium build after r295749

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32042

Bug ID: 32042
   Summary: conflicting debug info for argument in windows
chromium build after r295749
   Product: new-bugs
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: h...@chromium.org
CC: apra...@apple.com, llvm-bugs@lists.llvm.org

$ bin/clang -cc1 -triple x86_64-pc-windows-msvc19.0.0 -emit-obj
-mconstructor-aliases -munwind-tables -target-cpu x86-64  -fno-rtti-data
-gcodeview -gcodeview -debug-info-kind=limited -debugger-tuning=gdb
-ffunction-sections -fdata-sections  -Os -fdeprecated-macro -fms-extensions
-fms-compatibility -fms-compatibility-version=19.0 -std=c++14
-fdelayed-template-parsing -finline-functions -vectorize-loops -vectorize-slp
-x c++ a.ii -w
conflicting debug info for argument
  call void @llvm.dbg.declare(metadata %"class.password_manager::(anonymous
namespace)::MockFormFetcherImpl"** %this.addr, metadata !24506, metadata
!22235), !dbg !24509
!24505 = !DILocalVariable(name: "args", arg: 1, scope: !24487, file: !3, line:
119, type: !9722)
!24506 = !DILocalVariable(name: "this", arg: 1, scope: !24487, type: !14549,
flags: DIFlagArtificial | DIFlagObjectPointer)
clang: ../lib/IR/Verifier.cpp:4552: virtual bool
{anonymous}::VerifierLegacyPass::doFinalization(llvm::Module&): Assertion
`!V->hasBrokenDebugInfo() && "Module contains invalid debug info"' failed.

Reverting r295749 makes it go away.

(And does that have any relation to r295486, which got merged to 4.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 32043] New: LSR takes a long time for the testcase

2017-02-22 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=32043

Bug ID: 32043
   Summary: LSR takes a long time for the testcase
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: w...@google.com
CC: llvm-bugs@lists.llvm.org

For the testcase attached, at least since r290782 (not saying r290782 is the
culprit. Just earlier version I randomly picked cannot process the IR
correctly), we have the problem below:

llc < test-renamed.ll executed forever. 

The problem was paper covered by rL294814 for a short time and then exposed by
rL295378 again.

-- 
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 32044] New: tools/clang/lib/AST/Expr.cpp:1876: bool clang::InitListExpr::isTransparent() const: Assertion `getNumInits() == 1 && "multiple inits in glvalue init list"' failed

2017-02-22 Thread via llvm-bugs
http://bugs.llvm.org/show_bug.cgi?id=32044

Bug ID: 32044
   Summary: tools/clang/lib/AST/Expr.cpp:1876: bool
clang::InitListExpr::isTransparent() const: Assertion
`getNumInits() == 1 && "multiple inits in glvalue init
list"' failed
   Product: clang
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++14
  Assignee: unassignedclangb...@nondot.org
  Reporter: compn...@compnerd.org
CC: llvm-bugs@lists.llvm.org

Created attachment 18021
  --> http://bugs.llvm.org/attachment.cgi?id=18021&action=edit
reduced.cc

This occurs with C++11 and C++14.  Attached reduced test case demonstrates the
assertion 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 32045] New: clang crashes on valid code at -O2 and -O3 on x86_64-linux-gnu: Assertion `shiftAmt <= BitWidth && "Invalid shift amount"' failed

2017-02-22 Thread via llvm-bugs
http://bugs.llvm.org/show_bug.cgi?id=32045

Bug ID: 32045
   Summary: clang crashes on valid code at -O2 and -O3 on
x86_64-linux-gnu: Assertion `shiftAmt <= BitWidth &&
"Invalid shift amount"' failed
   Product: clang
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: s...@cs.ucdavis.edu
CC: llvm-bugs@lists.llvm.org

This appears to be a recent regression. 

$ clang -v
clang version 5.0.0 (trunk 295749) (llvm/trunk 295748)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.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.4
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
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$ 
$ clang -Os -w small.c
$ 
$ clang -O2 -w small.c
clang-5.0: /tmp/llvm-builder/llvm-source-trunk/lib/Support/APInt.cpp:1044:
llvm::APInt llvm::APInt::ashr(unsigned int) const: Assertion `shiftAmt <=
BitWidth && "Invalid shift amount"' failed.
#0 0x01f2293a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1f2293a)
#1 0x01f205de llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-5.0+0x1f205de)
#2 0x01f20752 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-5.0+0x1f20752)
#3 0x7f3f29d8b390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x7f3f28afe428 gsignal
/build/glibc-t3gR2i/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x7f3f28b0002a abort /build/glibc-t3gR2i/glibc-2.23/stdlib/abort.c:91:0
#6 0x7f3f28af6bd7 __assert_fail_base
/build/glibc-t3gR2i/glibc-2.23/assert/assert.c:92:0
#7 0x7f3f28af6c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x01ea35aa llvm::APInt::ashr(unsigned int) const
(/usr/local/clang-trunk/bin/clang-5.0+0x1ea35aa)
#9 0x016490d3 llvm::ScalarEvolution::getRange(llvm::SCEV const*,
llvm::ScalarEvolution::RangeSignHint)
(/usr/local/clang-trunk/bin/clang-5.0+0x16490d3)
#10 0x01648e94 llvm::ScalarEvolution::getRange(llvm::SCEV const*,
llvm::ScalarEvolution::RangeSignHint)
(/usr/local/clang-trunk/bin/clang-5.0+0x1648e94)
#11 0x0165424e llvm::ScalarEvolution::getMinusSCEV(llvm::SCEV const*,
llvm::SCEV const*, llvm::SCEV::NoWrapFlags)
(/usr/local/clang-trunk/bin/clang-5.0+0x165424e)
#12 0x01665002 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1371] [clone .constprop.1442]
(/usr/local/clang-trunk/bin/clang-5.0+0x1665002)
#13 0x01642dd0 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/usr/local/clang-trunk/bin/clang-5.0+0x1642dd0)
#14 0x0166469c
llvm::ScalarEvolution::createNodeFromSelectLikePHI(llvm::PHINode*)
(/usr/local/clang-trunk/bin/clang-5.0+0x166469c)
#15 0x01664893 llvm::ScalarEvolution::createNodeForPHI(llvm::PHINode*)
(/usr/local/clang-trunk/bin/clang-5.0+0x1664893)
#16 0x01665445 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1371] [clone .constprop.1442]
(/usr/local/clang-trunk/bin/clang-5.0+0x1665445)
#17 0x01642dd0 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/usr/local/clang-trunk/bin/clang-5.0+0x1642dd0)
#18 0x016633c9
llvm::ScalarEvolution::createAddRecFromPHI(llvm::PHINode*)
(/usr/local/clang-trunk/bin/clang-5.0+0x16633c9)
#19 0x01664859 llvm::ScalarEvolution::createNodeForPHI(llvm::PHINode*)
(/usr/local/clang-trunk/bin/clang-5.0+0x1664859)
#20 0x01665445 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1371] [clone .constprop.1442]
(/us