[llvm-bugs] [Bug 34732] FixNamespaceComments does not work when namespace braces are on the next line

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34732

Marek Kurdej  changed:

   What|Removed |Added

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

--- Comment #3 from Marek Kurdej  ---
Fixed in https://reviews.llvm.org/rL314279.
The fix will be included in clang-format 6. No idea about 5.0.1.

-- 
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] Issue 3495 in oss-fuzz: llvm: Timeout in llvm_clang-format-fuzzer

2017-09-27 Thread monor… via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com,  masc...@google.com,  jdevlieg...@apple.com,   
llvm-b...@lists.llvm.org
Labels: ClusterFuzz Unreproducible Engine-libfuzzer Proj-llvm  
Reported-2017-09-27


New issue 3495 by monor...@clusterfuzz-external.iam.gserviceaccount.com:  
llvm: Timeout in llvm_clang-format-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3495

Detailed report: https://oss-fuzz.com/testcase?key=5540391812071424

Project: llvm
Fuzzer: libFuzzer_llvm_clang-format-fuzzer
Fuzz target binary: clang-format-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address:
Crash State:
  llvm_clang-format-fuzzer

Sanitizer: address (ASAN)

Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5540391812071424


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


Note: This crash might not be reproducible with the provided testcase. That  
said, for the past 14 days we've been seeing this crash frequently. If you  
are unable to reproduce this, please try a speculative fix based on the  
crash stacktrace in the report. The fix can be verified by looking at the  
crash statistics in the report, a day after the fix is deployed. We will  
auto-close the bug if the crash is not seen for 14 days.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you have questions for the OSS-Fuzz team, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 34743] New: After r311849 Loop Vectorizer generates broken code

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34743

Bug ID: 34743
   Summary: After r311849 Loop Vectorizer generates broken code
   Product: tools
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: opt
  Assignee: unassignedb...@nondot.org
  Reporter: serguei.kat...@azul.com
CC: llvm-bugs@lists.llvm.org

Created attachment 19203
  --> https://bugs.llvm.org/attachment.cgi?id=19203&action=edit
Reproducer

After r311849 Loop Vectorizer generates a broken code.
The reproducer is attached.

to reproduce the issue I ran:
$ opt -mcpu=broadwell -loop-vectorize test.ll -S
Instruction does not dominate all uses!
  %59 = sext i32 %scalar.recur to i64
  %broadcast.splatinsert = insertelement <4 x i64> undef, i64 %59, i32 0
LLVM ERROR: Broken function found, compilation aborted!

Could you please fix this as soon as possible or disable the functionality
causing a regression.

-- 
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 34688] lld much slower than bfd when linking the linux kernel

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34688

George Rimar  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #3 from George Rimar  ---
rL314282

-- 
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 34373] Assertion failure in clang::ento::bugreporter::getDerefExpr

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34373

Artem Dergachev  changed:

   What|Removed |Added

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

--- Comment #4 from Artem Dergachev  ---
Fixed in r314287. Also fancier diagnostics in this example have appeared after
r314290.

-- 
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] Issue 3500 in oss-fuzz: llvm: Stack-overflow in llvm::APInt::tcShiftLeft

2017-09-27 Thread monor… via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com,  masc...@google.com,  jdevlieg...@apple.com,   
llvm-b...@lists.llvm.org
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2017-09-27


New issue 3500 by monor...@clusterfuzz-external.iam.gserviceaccount.com:  
llvm: Stack-overflow in llvm::APInt::tcShiftLeft

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3500

Detailed report: https://oss-fuzz.com/testcase?key=4961379989585920

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffd577f6f98
Crash State:
  llvm::APInt::tcShiftLeft
  llvm::detail::IEEEFloat::shiftSignificandLeft
  llvm::detail::IEEEFloat::normalize

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201709120449:201709130450


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=4961379989585920


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you have questions for the OSS-Fuzz team, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 34744] New: Clang produces less useful error message when explicit constructor invoked implicitly

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34744

Bug ID: 34744
   Summary: Clang produces less useful error message when explicit
constructor invoked implicitly
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: csaba...@yahoo.co.uk
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

$ clang -v
clang version 5.0.0 (trunk 308427)

$ cat errmsg.cpp
#include 
#include 

namespace a {
struct AV {
explicit AV(std::string const&);
};
// ---

struct EAV;

typedef std::map EAM;

struct EAV {
explicit EAV(AV const&);
};

// ---

struct UIRQ {
typedef EAM ET;

ET const& expected() const;

UIRQ & expected(ET const&);
};
}

int main()
{
a::UIRQ req;
req.expected({ {"kye", a::AV{ "valu" } } });
}

/* GCC 8
errmsg.cpp: In function ‘int main()’:
errmsg.cpp:32:47: error: converting to ‘std::pair, a::EAV>’ from initializer list would use explicit
constructor ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 =
const char (&)[4]; _U2 = a::AV; typename std::enable_if<(std::_PCC::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type  =
0; _T1 = const std::basic_string; _T2 = a::EAV]’
 req.expected({ {"kye", a::AV{ "valu" } } });
   ^
*/

/* clang 5.0.0
errmsg.cpp:32:9: error: no matching member function for call to 'expected'
req.expected({ {"kye", a::AV{ "valu" } } });
^~~~
errmsg.cpp:25:16: note: candidate function not viable: cannot convert
initializer list argument to 'const a::UIRQ::ET' (aka 'const
map, a::EAV>')
UIRQ & expected(ET const&);
   ^
errmsg.cpp:23:19: note: candidate function not viable: requires 0 arguments,
but 1 was provided
ET const& expected() const;
  ^

*/

The GCC error message mentions a hint to the problem (EAV constructor is
explicit). Clang's error message makes no mention of 'explicit'.

-- 
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 34745] New: wrong code with opt "-sroa -loop-rotate -licm -simplifycfg -loop-unroll -slp-vectorizer -latesimplifycfg -instcombine -loop-reroll"

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34745

Bug ID: 34745
   Summary: wrong code with opt "-sroa -loop-rotate -licm
-simplifycfg -loop-unroll -slp-vectorizer
-latesimplifycfg -instcombine -loop-reroll"
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: s...@cs.ucdavis.edu
CC: llvm-bugs@lists.llvm.org

$ clangpolly -v
clang version 6.0.0 (http://llvm.org/git/clang.git
f475b581cc5a98d8b44e476884245ecfe7d33051)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/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.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
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.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.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.2.0
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
$ 
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -sroa -loop-rotate -licm -simplifycfg -loop-unroll -slp-vectorizer
-latesimplifycfg -instcombine -loop-reroll -o small-opt.bc small.bc
$ clangpolly small-opt.bc; ./a.out
Segmentation fault (core dumped)
$ 
$ clangpolly -O0 small.c; ./a.out
$ 


--


int a, b[64];

int main ()
{
  while (1)
{
  int c;
  for (; a < 8; a++)
for (c = 0; c < 8; c++)
  b[a * 8 + c] = 0;
  break;
}
  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 34746] New: Slow compilation when compiling a function which contains many always_inline function calls in it

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34746

Bug ID: 34746
   Summary: Slow compilation when compiling a function which
contains many always_inline function calls in it
   Product: clang
   Version: 5.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: fusca...@gmail.com
CC: llvm-bugs@lists.llvm.org

Created attachment 19206
  --> https://bugs.llvm.org/attachment.cgi?id=19206&action=edit
Source file used to reproduce the problem

I've extracted the attached file from our code base. Clang is the only compiler
we use that is slow for this files (we use msvc++, intel and gcc 4.8 on various
OSes).

To reproduce the bug execute:
clang++ clang_slow_append.cpp -std=c++11 -O3  -ftime-report

The result from the time report is:
===-===
 Miscellaneous Ungrouped Timers
===-===

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  ---
Name ---
  12.6961 (100.0%)   0.0650 (100.0%)  12.7611 (100.0%)  12.7708 (100.0%)  Code
Generation Time
   0.0020 (  0.0%)   0. (  0.0%)   0.0020 (  0.0%)   0.0025 (  0.0%)  LLVM
IR Generation Time
  12.6981 (100.0%)   0.0650 (100.0%)  12.7631 (100.0%)  12.7732 (100.0%)  Total

===-===
  Register Allocation
===-===
  Total Execution Time: 0.0070 seconds (0.0043 wall clock)

   ---User Time---   --User+System--   ---Wall Time---  --- Name ---
   0.0030 ( 42.9%)   0.0030 ( 42.9%)   0.0025 ( 57.7%)  Seed Live Regs
   0.0040 ( 57.1%)   0.0040 ( 57.1%)   0.0018 ( 42.3%)  Evict
   0.0070 (100.0%)   0.0070 (100.0%)   0.0043 (100.0%)  Total

===-===
  Instruction Selection and Scheduling
===-===
  Total Execution Time: 0.8019 seconds (0.7632 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  ---
Name ---
   0.1580 ( 20.1%)   0.0030 ( 18.8%)   0.1610 ( 20.1%)   0.1549 ( 20.3%) 
Instruction Selection
   0.1290 ( 16.4%)   0.0030 ( 18.7%)   0.1320 ( 16.5%)   0.1416 ( 18.5%) 
Instruction Scheduling
   0.1170 ( 14.9%)   0.0030 ( 18.7%)   0.1200 ( 15.0%)   0.1224 ( 16.0%)  DAG
Combining 1
   0.0850 ( 10.8%)   0.0010 (  6.3%)   0.0860 ( 10.7%)   0.0720 (  9.4%)  DAG
Combining 2
   0.0730 (  9.3%)   0.0030 ( 18.7%)   0.0760 (  9.5%)   0.0663 (  8.7%) 
Instruction Creation
   0.0770 (  9.8%)   0.0010 (  6.3%)   0.0780 (  9.7%)   0.0662 (  8.7%)  DAG
Combining after legalize types
   0.0630 (  8.0%)   0.0010 (  6.3%)   0.0640 (  8.0%)   0.0633 (  8.3%)  DAG
Legalization
   0.0570 (  7.3%)   0.0010 (  6.2%)   0.0580 (  7.2%)   0.0494 (  6.5%)  Type
Legalization
   0.0160 (  2.0%)   0. (  0.0%)   0.0160 (  2.0%)   0.0159 (  2.1%) 
Vector Legalization
   0.0110 (  1.4%)   0. (  0.0%)   0.0110 (  1.4%)   0.0112 (  1.5%) 
Instruction Scheduling Cleanup
   0.7859 (100.0%)   0.0160 (100.0%)   0.8019 (100.0%)   0.7632 (100.0%)  Total

===-===
 DWARF Emission
===-===
  Total Execution Time: 0. seconds (0.0001 wall clock)

   ---Wall Time---  --- Name ---
   0. ( 73.3%)  Debug Info Emission
   0. ( 23.0%)  DWARF Exception Writer
   0. (  3.6%)  DWARF Debug Writer
   0.0001 (100.0%)  Total

===-===
  ... Pass execution timing report ...
===-===
  Total Execution Time: 12.7041 seconds (12.7088 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  ---
Name ---
   5.1662 ( 40.9%)   0.0090 ( 14.8%)   5.1752 ( 40.7%)   5.1773 ( 40.7%) 
Unroll loops
   1.7977 ( 14.2%)   0.0090 ( 14.8%)   1.8067 ( 14.2%)   1.8151 ( 14.3%)  Loop
Strength Reduction
   1.1068 (  8.8%)   0.0250 ( 41.0%)   1.1318 (  8.9%)   1.1315 (  8.9%)  X86
DAG->DAG Instruction Selection
   1.1258 (  8.9%)   0.0030 (  4.9%)   1.1288 (  8.9%)   1.1221 (  8.8%) 
Induction Variable Users
   0.5319 (  4.2%)   0. (  0.0%)   0.5319 (  4.2%)   0.5324 (  4.2%) 
CodeGen Prepare
   0.3409 (  2.7%)   0. (  0.0%)   0.3409 (  2.7%)   0.3415 (  2.7%) 
Combine redundant instructions
   0.2950 (  2.3%)   0. (  0.0%)   0.2950 (  2.3%)   0.2953 (  2.3%) 
Eliminate PHI nodes f

[llvm-bugs] [Bug 34462] opt crashes with "opt -jump-threading -mem2reg -gvn -ipsccp -gvn -adce -gvn-hoist": Assertion `UpperBound != 0' failed

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34462

Davide Italiano  changed:

   What|Removed |Added

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

--- Comment #4 from Davide Italiano  ---
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 34459] opt crashes with "opt -inline -instcombine -adce -newgvn -gvn-hoist": Assertion `dominates(MD, U) && "Memory Def does not dominate it's uses"' failed

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34459

Davide Italiano  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |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 34750] New: lld produces a corrupted file header

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34750

Bug ID: 34750
   Summary: lld produces a corrupted file header
   Product: lld
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: ELF
  Assignee: unassignedb...@nondot.org
  Reporter: rafael.espind...@gmail.com
CC: llvm-bugs@lists.llvm.org, pho...@chromium.org

Given

test.s:
 .section .zed, "a"
 .zero 4

test.script:

PHDRS {
  foobar PT_LOAD FILEHDR PHDRS;
}
SECTIONS {
  . = 0x1000;
  .abc : { *(.zed) } : foobar
}

with test.s assembled for x86_64-pc-linux and linking with

ld.lld --script test.script test.o -o t

the file header is corrupted:

% file t
t: data

This works with bfd, gold and lld before r311586

-- 
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 34492] [meta] 5.0.1 Release Blockers

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34492
Bug 34492 depends on bug 34493, which changed state.

Bug 34493 Summary: Merge r312337 into the 5.0 branch : AMDGPU: IMPLICIT_DEFs 
and DBG_VALUEs do not contribute to wait states
https://bugs.llvm.org/show_bug.cgi?id=34493

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |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 34751] New: Error in backend: Cannot encode high byte register in REX-prefixed instruction

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34751

Bug ID: 34751
   Summary: Error in backend: Cannot encode high byte register in
REX-prefixed instruction
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: douglas_y...@playstation.sony.com
CC: llvm-bugs@lists.llvm.org

We hit this crash in the compiler which was introduced in r314151, fixed in
r314199 (a revert of r314151), and then reintroduced in r314249 which was a
recommit of r314151.

Here is the repro that we came up with:

/* test.c */
struct S {
  unsigned char *buf;
  unsigned int p;
  unsigned int w;
  unsigned long a;
};
extern unsigned long foo();
int bar(struct S * s) {
  s->a = foo();
  unsigned int h = (s->w) << 8;
  if (s)
h |= 0x20;
  h += 31 - (h % 31);
  s->buf[s->p++] = h >> 8;
  s->buf[0] = h;
  return s->p != 0;
}

If you compile this on linux with "-O2 -march=btver2", you get the following
crash:

clang version 6.0.0 (trunk 314249)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/dyung/src/upstream/314249-linux/bin
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.4
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.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.1.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/dyung/src/upstream/314249-linux/bin/clang-6.0" -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name test.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu btver2
-dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v
-coverage-notes-file /home/dyung/sandbox/184159/test.gcno -resource-dir
/home/dyung/src/upstream/314249-linux/lib/clang/6.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/dyung/src/upstream/314249-linux/lib/clang/6.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /home/dyung/sandbox/184159 -ferror-limit 19
-fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option
-vectorize-loops -vectorize-slp -o test.o -x c test.c
clang -cc1 version 6.0.0 based upon LLVM 6.0.0 default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/dyung/src/upstream/314249-linux/lib/clang/6.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
fatal error: error in backend: Cannot encode high byte register in REX-prefixed
instruction
clang-6.0: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 6.0.0 (trunk 314249)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/dyung/src/upstream/314249-linux/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg: 


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test-c4d6b5.c
clang-6.0: note: diagnostic msg: /tmp/test-c4d6b5.sh
clang-6.0: note: diagnostic msg: 



-- 
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 34493] Merge r312337 into the 5.0 branch : AMDGPU: IMPLICIT_DEFs and DBG_VALUEs do not contribute to wait states

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34493

Tom Stellard  changed:

   What|Removed |Added

 Fixed By Commit(s)|r312337 |r312337 r314327
 Status|NEW |RESOLVED
 Resolution|--- |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] Issue 3506 in oss-fuzz: llvm: Stack-overflow in clang::RecursiveASTVisitor::dataTraverseNode

2017-09-27 Thread monor… via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com,  masc...@google.com,  jdevlieg...@apple.com,   
llvm-b...@lists.llvm.org
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2017-09-27


New issue 3506 by monor...@clusterfuzz-external.iam.gserviceaccount.com:  
llvm: Stack-overflow in  
clang::RecursiveASTVisitor::dataTraverseNode

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3506

Detailed report: https://oss-fuzz.com/testcase?key=4874521725108224

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffe3bc44c98
Crash State:
  clang::RecursiveASTVisitor::dataTraverseNode
  clang::RecursiveASTVisitor::TraverseStmt
  clang::RecursiveASTVisitor::TraverseDecl

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201709060453:201709070449


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=4874521725108224


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you have questions for the OSS-Fuzz team, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 34752] New: MCWinCOFFStreamer::EmitAssemblerFlag not implemented

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34752

Bug ID: 34752
   Summary: MCWinCOFFStreamer::EmitAssemblerFlag not implemented
   Product: libraries
   Version: 3.9
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: MC
  Assignee: unassignedb...@nondot.org
  Reporter: aa...@blizzard.com
CC: llvm-bugs@lists.llvm.org

Created attachment 19207
  --> https://bugs.llvm.org/attachment.cgi?id=19207&action=edit
wow64 far call test

MCWinCOFFStreamer::EmitAssemblerFlag causes clang/llvm to segfault on windows
when you attempt to use any assembler flag (code64/code32/etc)

I assumed this was due to some greater incompatibility, but i copied the
functionality from the MACHO/ELF streamer and it is able to successfully
compile 64-bit code in a 32-bit binary.

I am wondering if this was merely overlooked or if it's simply unsupported due
to some compatibility issue on another layer.

I tagged the version at 3.9 because I'm using 3.9.0 final, but looking at 5.0
it seems the issue (if there is one at all) persists.

Attached is a test case that compiles and functions properly when
EmitAssemblerFlag is "enabled"

-- 
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 34753] New: [AArch64][CodeGen][CodeSize] Redundant 'and' can be remove with shifts in addr mode

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34753

Bug ID: 34753
   Summary: [AArch64][CodeGen][CodeSize] Redundant 'and' can be
remove with shifts in addr mode
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AArch64
  Assignee: unassignedb...@nondot.org
  Reporter: mcros...@codeaurora.org
CC: llvm-bugs@lists.llvm.org

Test case:
int test(unsigned long long a, unsigned long long b, int *table) {
  return table[(a * b) >> 58];  
}

Current assembly:
test:   // @test
// BB#0:// %entry
mul x8, x1, x0
lsr x8, x8, #56
and x8, x8, #0xfc
ldr w0, [x2, x8]
ret

We should be able to remove the 'and' for a code size with as follows:
test:   // @test
// BB#0:// %entry
mul x8, x1, x0
lsr x8, x8, #58
ldr w0, [x2, x8, lsl#2]
ret

I'm not interested in pursuing this optimization, but I figured I'd file the
bug, regardless.

-- 
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 34751] Error in backend: Cannot encode high byte register in REX-prefixed instruction

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34751

Craig Topper  changed:

   What|Removed |Added

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

--- Comment #1 from Craig Topper  ---
Reverted in r314339 and r314338. Maybe I just shouldn't mess with this. Thanks
for the bug report.

-- 
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 34754] New: static data member "unresolved external symbol" if constexpr is used in its definition

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34754

Bug ID: 34754
   Summary: static data member "unresolved external symbol" if
constexpr is used in its definition
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: C++11
  Assignee: unassignedclangb...@nondot.org
  Reporter: powerch...@web.de
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

// header.h
struct S { static int const i; };

// source.cpp
#include "header.h"
constexpr int const S::i = 0;

// main.cpp
#include "header.h"
int main()
{
return S::i; // error or OK, depending on "C++ Language Standard" in compiler
options
}

If compiled with clang and "ISO C++ Latest Draft Standard (/std:c++latest)":
linker error "unresolved external symbol"

If compiled with clang and "ISO C++17 Standard (/std:c++17)" or "ISO C++14
Standard (/std:c++14)": OK

If compiled with VC: OK in all cases

I'm using Visual Studio 2017 on Windows 10 64-bit and the latest clang for
Windows.
Can someone tell me what's going on here? Is this a bug in clang?
S::i has external linkage, but clang seems to transform it into internal
linkage if constexpr is in the definition. Why?

-- 
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 34755] New: AVRMCExpr::evaluateAsInt64 does not mask out unneeded bits

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34755

Bug ID: 34755
   Summary: AVRMCExpr::evaluateAsInt64 does not mask out unneeded
bits
   Product: libraries
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AVR
  Assignee: unassignedb...@nondot.org
  Reporter: m...@dylanmckay.io
CC: llvm-bugs@lists.llvm.org

After performing any unnecessary shifting, we should be masking out bits
depending on what the `AVRMCExpr` modifier is

-- 
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 34492] [meta] 5.0.1 Release Blockers

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34492
Bug 34492 depends on bug 34723, which changed state.

Bug 34723 Summary: Merge r312905 r314070 into the 5.0 branch : [AVR] Enable the 
'__do_copy_data' function
https://bugs.llvm.org/show_bug.cgi?id=34723

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |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 34723] Merge r312905 r314070 into the 5.0 branch : [AVR] Enable the '__do_copy_data' function

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34723

Dylan McKay  changed:

   What|Removed |Added

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

-- 
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 34722] Merge r311620 into the 5.0 branch : [AVR] Use the correct register classes for 16-bit atomic operations

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34722

Dylan McKay  changed:

   What|Removed |Added

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

--- Comment #3 from Dylan McKay  ---
Merged r311620 in r314358

-- 
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 34492] [meta] 5.0.1 Release Blockers

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34492
Bug 34492 depends on bug 34722, which changed state.

Bug 34722 Summary: Merge r311620 into the 5.0 branch : [AVR] Use the correct 
register classes for 16-bit atomic operations
https://bugs.llvm.org/show_bug.cgi?id=34722

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |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 34756] New: lld: Merge r34492 into 5.0.1

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34756

Bug ID: 34756
   Summary: lld: Merge r34492 into 5.0.1
   Product: lld
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: ELF
  Assignee: unassignedb...@nondot.org
  Reporter: r...@google.com
CC: llvm-bugs@lists.llvm.org

r313741 fixes a crash/data corruption bug in .eh_frame. I think this needs to
be merged in 5.0.1.

-- 
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 34757] New: lld: merge r312706 into 5.0.1

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34757

Bug ID: 34757
   Summary: lld: merge r312706 into 5.0.1
   Product: lld
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: ELF
  Assignee: unassignedb...@nondot.org
  Reporter: r...@google.com
CC: llvm-bugs@lists.llvm.org

r312706 fixes a data corruption bug in .eh_frame and should be merged into 5.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 34758] New: r313904 causes "command source" to assert and die

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34758

Bug ID: 34758
   Summary: r313904 causes "command source" to assert and die
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-...@lists.llvm.org
  Reporter: jing...@apple.com
CC: llvm-bugs@lists.llvm.org

The assert in StartHandlingCommand trips (the value is eInProgress, should be
eIdle).

This also causes lldb to crash on startup if you have a .lldbinit, so I've
backed out the patchset for r313904 for now.

We apparently don't have any tests for command source (it was part of the
earliest bits of lldb from before we hired somebody to write the testsuite...)

-- 
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 34759] New: clang crashes on valid code at -O2 and -O3 on x86_64-linux-gnu: Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' fail

2017-09-27 Thread via llvm-bugs
01976e06 RunAllPassesOnSCC
/home/su/software/tmp/polly/llvm/lib/Analysis/CallGraphSCCPass.cpp:424:0
#19 0x01976e06 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
/home/su/software/tmp/polly/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0
#20 0x01e8deea runOnModule
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1591:0
#21 0x01e8deea llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1694:0
#22 0x02488aa5 ~PrettyStackTraceString
/home/su/software/tmp/polly/llvm/include/llvm/Support/PrettyStackTrace.h:52:0
#23 0x02488aa5 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr >)
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:789:0
#24 0x02489e80 ~unique_ptr /usr/include/c++/4.9/bits/unique_ptr.h:235:0
#25 0x02489e80 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr >)
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1145:0
#26 0x02c9065c ~unique_ptr /usr/include/c++/4.9/bits/unique_ptr.h:235:0
#27 0x02c9065c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:294:0
#28 0x02e6843c swap /usr/include/c++/4.9/bits/move.h:177:0
#29 0x02e6843c clang::ParseAST(clang::Sema&, bool, bool)
/home/su/software/tmp/polly/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0
#30 0x02c8faf0 clang::CodeGenAction::ExecuteAction()
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1024:0
#31 0x0283672e clang::FrontendAction::Execute()
/home/su/software/tmp/polly/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:897:0
#32 0x0280a8d6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/su/software/tmp/polly/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:991:0
#33 0x028cc7d1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/su/software/tmp/polly/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0
#34 0x00d87918 cc1_main(llvm::ArrayRef, char const*,
void*)
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0
#35 0x00d15923 ExecuteCC1Tool
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/driver.cpp:309:0
#36 0x00d15923 main
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/driver.cpp:388:0
#37 0x7f770fc25f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#38 0x00d83b59 _start
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0xd83b59)
Stack dump:
0.  Program arguments: /home/su/software/tmp/polly/llvm_build/bin/clang-6.0
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -resource-dir
/home/su/software/tmp/polly/llvm_build/lib/clang/6.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/su/software/tmp/polly/llvm_build/lib/clang/6.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir
/home/su/specres/20170927-clangpolly-m64-O3-mllvm-polly-mllvm-enable-newgvn-build-083337
-ferror-limit 19 -fmessage-length 116 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /tmp/small-6b8006.o -x c small.c 
1.   parser at end of file
2.  Per-module optimization passes
3.  Running pass 'CallGraph Pass Manager' on module 'small.c'.
4.  Running pass 'Loop Pass Manager' on function '@fn1'
5.  Running pass 'Induction Variable Simplification' on basic block
'%while.body'
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (http://llvm.org/git/clang.git
31a16c4f5bc89d8e9ca6c0a52a34b98c18058b6b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg: 


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/small-f

[llvm-bugs] [Bug 34760] New: wrong code with "opt -instcombine -early-cse-memssa -loop-rotate -loop-unroll -newgvn -simplifycfg -licm -loop-reroll"

2017-09-27 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=34760

Bug ID: 34760
   Summary: wrong code with "opt -instcombine -early-cse-memssa
-loop-rotate -loop-unroll -newgvn -simplifycfg -licm
-loop-reroll"
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: s...@cs.ucdavis.edu
CC: llvm-bugs@lists.llvm.org

This is tested with rev. 314335. 


$ clangpolly -v
clang version 6.0.0 (http://llvm.org/git/clang.git
31a16c4f5bc89d8e9ca6c0a52a34b98c18058b6b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/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.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
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.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.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.2.0
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
$ 
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -instcombine -early-cse-memssa -loop-rotate -loop-unroll -newgvn
-simplifycfg -licm -loop-reroll -o small-opt.bc small.bc
$ clangpolly small-opt.bc
$ ./a.out
8
$ 
$ clangpolly -O0 small.c; ./a.out
1
$ 





int printf (const char *, ...); 

int a, b, c[1][8];

int main ()
{
  for (; a < 1; a++)
for (b = 0; b < 8; b++)
  c[a][b] = 0;
  printf ("%d\n", a);
  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