[llvm-bugs] Issue 34282 in oss-fuzz: llvm:llvm-opt-fuzzer--x86_64-instcombine: Timeout in llvm-opt-fuzzer--x86_64-instcombine

2021-05-14 Thread ClusterFuzz-External via monorail via llvm-bugs
Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevl...@apple.com, igm...@gmail.com, 
d...@google.com, mit...@google.com, bigch...@gmail.com, eney...@google.com, 
llvm-...@lists.llvm.org, j...@chromium.org, v...@apple.com, 
mitch...@outlook.com, xpl...@gmail.com, akils...@apple.com 
Labels: ClusterFuzz Reproducible Engine-libfuzzer OS-Linux Proj-llvm 
Reported-2021-05-14
Type: Bug

New issue 34282 by ClusterFuzz-External: 
llvm:llvm-opt-fuzzer--x86_64-instcombine: Timeout in 
llvm-opt-fuzzer--x86_64-instcombine
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34282

Detailed Report: https://oss-fuzz.com/testcase?key=5269710288584704

Project: llvm
Fuzzing Engine: libFuzzer
Fuzz Target: llvm-opt-fuzzer--x86_64-instcombine
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Timeout (exceeds 60 secs)
Crash Address: 
Crash State:
  llvm-opt-fuzzer--x86_64-instcombine
  
Sanitizer: address (ASAN)

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

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

Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing for 
instructions to reproduce this bug locally.
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 need to contact the OSS-Fuzz team with a question, concern, or any other 
feedback, please file an issue at https://github.com/google/oss-fuzz/issues. 
Comments on individual Monorail issues are not monitored.

-- 
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 50057] Cannot select: t10: i64 = AArch64ISD::VSHL t2, Constant:i32<2>

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50057

Sjoerd Meijer  changed:

   What|Removed |Added

 CC||sjoerd.mei...@arm.com
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Sjoerd Meijer  ---
Fixed by commit rG1ee50b473168.

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


[llvm-bugs] [Bug 50339] New: [Regression] MemorySSA DSE fails to remove redundant memcpy

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50339

Bug ID: 50339
   Summary: [Regression] MemorySSA DSE fails to remove redundant
memcpy
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org

extern char a[32];

void f (const void *s)
{
  char *p = (char*)__builtin_memcpy (a, s, 16) + 16;
  __builtin_memcpy (p - 16, s, 16);
}

Regressed with LLVM 12.

Current IR:
@a = external dso_local local_unnamed_addr global [32 x i8], align 16

define dso_local void @_Z1fPKv(i8* nocapture readonly %0) local_unnamed_addr #0
{
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 16
dereferenceable(16) getelementptr inbounds ([32 x i8], [32 x i8]* @a, i64 0,
i64 0), i8* nonnull align 1 dereferenceable(16) %0, i64 16, i1 false)
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 16
dereferenceable(16) getelementptr inbounds ([32 x i8], [32 x i8]* @a, i64 0,
i64 0), i8* nonnull align 1 dereferenceable(16) %0, i64 16, i1 false)
  ret void
}



https://godbolt.org/z/vdTGjdTvn

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


[llvm-bugs] [Bug 50340] New: Assertion failure for defaulted destructor ...

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50340

Bug ID: 50340
   Summary: Assertion failure for defaulted destructor ...
   Product: clang
   Version: 12.0
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: jacques.legar...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

clang-12 crashed on the attached source file, with the following report

clang-12: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 12.0.0
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Volumes/Data/llvm-project-12.0.0/bld/bin
clang-12: note: diagnostic msg: 


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg:
/var/folders/t1/py7_3w4j7jgfr589j_1nwg4wgn/T/parser-18eedf.cpp
clang-12: note: diagnostic msg:
/var/folders/t1/py7_3w4j7jgfr589j_1nwg4wgn/T/parser-18eedf.sh
clang-12: note: diagnostic msg: Crash backtrace is located in
clang-12: note: diagnostic msg:
/Users/jl/Library/Logs/DiagnosticReports/clang-12__.crash
clang-12: note: diagnostic msg: (choose the .crash file that corresponds to
your crash)
clang-12: note: diagnostic msg: 



Unfortunately, there was not crash backtrace at the specified location. The
source files and stack dump are attached.

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


[llvm-bugs] [Bug 50175] [WebAssembly] "Non-terminator instruction after the first terminator" Verification failure after DebugFixup

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50175

Heejin Ahn  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Fixed By Commit(s)||71fbfb499aaaefbb2b24e5652df
   ||5525684766bfc
 Resolution|--- |FIXED

--- Comment #1 from Heejin Ahn  ---
Fixed by
https://github.com/llvm/llvm-project/commit/71fbfb499aaaefbb2b24e5652df5525684766bfc.

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


[llvm-bugs] [Bug 35418] Analyzer doesn't realize '0 % x' is 0

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=35418

Balazs Benics  changed:

   What|Removed |Added

 CC||balazs.benics@sigmatechnolo
   ||gy.se
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Balazs Benics  ---
Indeed, Valeriy Savchenko fixed this with
https://github.com/llvm/llvm-project/commit/73c120a9895a7e12e3c29a755d64096c8bd0220f
on May 28, 2020.

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


[llvm-bugs] [Bug 50341] New: wrong code at -Os and above on x86_64-linux-gnu

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50341

Bug ID: 50341
   Summary: wrong code at -Os and above on x86_64-linux-gnu
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: zhendong...@inf.ethz.ch
CC: llvm-bugs@lists.llvm.org

It seems to be a recent regression and might be related to
https://bugs.llvm.org/show_bug.cgi?id=50324.

[618] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
4789fc75d3501f14cfbd5b102f173721d498ff58)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[619] % 
[619] % clangtk -O1 small.c; ./a.out
-4
[620] % clangtk -Os small.c
[621] % ./a.out
-2
[622] % 
[622] % cat small.c
int printf (const char *, ...);
char a, f;
int b, d;
static int *c = &b;
unsigned char g(unsigned char h, int i) { return h << i; }
void j(int **h) { j(&c); }
int main() {
  *c = 0;
  d = b | -2;
  f = g(d, a == 0);
  printf("%d\n", f);
  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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 34282 in oss-fuzz: llvm:llvm-opt-fuzzer--x86_64-instcombine: Timeout in llvm-opt-fuzzer--x86_64-instcombine

2021-05-14 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #1 on issue 34282 by ClusterFuzz-External: 
llvm:llvm-opt-fuzzer--x86_64-instcombine: Timeout in 
llvm-opt-fuzzer--x86_64-instcombine
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34282#c1

ClusterFuzz testcase 5269710288584704 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202105130607:202105140620

If this is incorrect, please file a bug on 
https://github.com/google/oss-fuzz/issues/new

-- 
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 33520 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in clang::Sema::isTemplateName

2021-05-14 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #1 on issue 33520 by ClusterFuzz-External: llvm:clang-fuzzer: 
Stack-overflow in clang::Sema::isTemplateName
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33520#c1

ClusterFuzz testcase 5715495941701632 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202105130607:202105140620

If this is incorrect, please file a bug on 
https://github.com/google/oss-fuzz/issues/new

-- 
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 34128 in oss-fuzz: llvm:llvm-isel-fuzzer--aarch64-gisel: ASSERT: mutationIsSane(Rule, Query, Mutation) && "legality mutation invalid for match"

2021-05-14 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #1 on issue 34128 by ClusterFuzz-External: 
llvm:llvm-isel-fuzzer--aarch64-gisel: ASSERT: mutationIsSane(Rule, Query, 
Mutation) && "legality mutation invalid for match"
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34128#c1

ClusterFuzz testcase 5853771432329216 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202105130607:202105140620

If this is incorrect, please file a bug on 
https://github.com/google/oss-fuzz/issues/new

-- 
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 50342] New: Missing diagnostic for comma in constant expression

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50342

Bug ID: 50342
   Summary: Missing diagnostic for comma in constant expression
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: john.br...@arm.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

In the C11 (and earlier) standard it says in section 6.6 about constant
expressions:

  Constant expressions shall not contain assignment, increment, decrement,
function-call,
  or comma operators, except when they are contained within a subexpression
that is not
  evaluated.

Which means we should be giving a diagnostic for code like this

  static const int i = 0 ? 2 : ((void)3, 4);

There's a comment in clang/lib/Sema/SemaDecl.cpp about this:

  // FIXME: Need strict checking.  In C89, we need to check for
  // any assignment, increment, decrement, function-calls, or
  // commas outside of a sizeof.  In C99, it's the same list,
  // except that the aforementioned are allowed in unevaluated
  // expressions.  Everything else falls under the
  // "may accept other forms of constant expressions" exception.

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


[llvm-bugs] [Bug 50343] New: Assertion failure in absence of -isysroot ...

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50343

Bug ID: 50343
   Summary: Assertion failure in absence of -isysroot ...
   Product: clang
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: jacques.legar...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

The following program

   #include 

triggers an assert failure when compiled without -isysroot, as in

   $ /Volumes/Data/llvm-project-12.0.0/bld/bin/clang++ stuff.cpp
`/Volumes/Data/llvm-project-12.0.0/bld/bin/llvm-config --cxxflags`

yielding

   Assertion failed: (!CodeSynthesisContexts.empty() && "Cannot perform an
instantiation without some context on the " "instantiation stack"), function
SubstType, file
/Volumes/Data/llvm-project-12.0.0/llvm-project-12.0.0.src/clang/lib/Sema/SemaTemplateInstantiate.cpp,
line 2071.

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


[llvm-bugs] [Bug 50344] New: clang 12.0.0 ignores copy constructor and fails to compile seemingly correct code

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50344

Bug ID: 50344
   Summary: clang 12.0.0 ignores copy constructor and fails to
compile seemingly correct code
   Product: new-bugs
   Version: 12.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: f.kaz...@corp.mail.ru
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 24857
  --> https://bugs.llvm.org/attachment.cgi?id=24857&action=edit
code in question

Hello,
I have got an issue on move/copy ctors with clang 12.0.0 compliling my code


Version:

[root@trgbuild build]# clang++ -v
clang version 12.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-last/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64


Code:

struct test_t {
test_t(test_t&&) = delete;
test_t(const test_t&) {};
test_t() {};
};

test_t failing(void) {
test_t tmp;
return tmp;
}

int main(void) {
return 0;
}


Observed behaviour:

[root@trgbuild build]# clang++ movector.cpp 
movector.cpp:9:12: error: call to deleted constructor of 'test_t'
return tmp;
   ^~~
movector.cpp:2:5: note: 'test_t' has been explicitly marked deleted here
test_t(test_t&&) = delete;
^
1 error generated.


Expected (by me) behaviour:
Compiles, provided copy constructor is used to return a value from function


Reasoning:

C++17 6.3.2/2:
> [Note: A return statement can involve an invocation of a constructor to 
> perform a 
> copy or move of the operand if it is not a prvalue or if its type differs 
> from the
> return type of the function.
So, compliler can use a copy constructor on return statement

https://en.cppreference.com/w/cpp/language/move_constructor:
> If only the copy constructor is provided, all argument categories select it
> (as long as it takes a reference to const, since rvalues can bind to const
> references), which makes copying the fallback for moving, when moving is
> unavailable.
So, it should use copy ctor having move ctor deleted


Is it a bug or I simply misunderstand something?

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


[llvm-bugs] [Bug 50345] New: coroutines + templates + "-fsanitize=undefined" = error in backend: Cannot represent a difference across sections (clang++ 10, 11, 12, trunk)

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50345

Bug ID: 50345
   Summary: coroutines + templates + "-fsanitize=undefined" =
error in backend: Cannot represent a difference across
sections (clang++ 10, 11, 12, trunk)
   Product: new-bugs
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: kamilgbr...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 24858
  --> https://bugs.llvm.org/attachment.cgi?id=24858&action=edit
Code that crashes the compiler

The attached file causes clang++ to crash given certain compilation flags.
also godbolt: https://godbolt.org/z/j14YMxj5M

$ clang++ --version
clang version 10.0.1 (Fedora 10.0.1-3.fc32)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang++ coro-crash.cpp -std=c++20 -stdlib=libc++ -fsanitize=undefined
fatal error: error in backend: Cannot represent a difference across
sections
Stack dump:
0.  Program arguments: /usr/bin/clang++ -std=c++20 -fsanitize=undefined
-fcolor-diagnostics -stdlib=libc++ -c -o coro-crash.o coro-crash.cpp 
1.   parser at end of file
2.  Code generation
   
/lib64/libLLVM-10.so(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2e)[0x7f60b555e10e]
   
/lib64/libLLVM-10.so(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x7f60b555c3e4]
   
/lib64/libLLVM-10.so(_ZN4llvm20CrashRecoveryContext10HandleExitEi+0x78)[0x7f60b549b768]
/lib64/libLLVM-10.so(_ZN4llvm3sys7Process4ExitEi+0x1b)[0x7f60b5556ffb]
/usr/bin/clang++(+0x16372)[0x55988c5f0372]
   
/lib64/libLLVM-10.so(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x8b)[0x7f60b54a702b]
/lib64/libLLVM-10.so(+0x1bc7623)[0x7f60b66db623]
/lib64/libLLVM-10.so(+0x1ba83c6)[0x7f60b66bc3c6]
   
/lib64/libLLVM-10.so(_ZN4llvm11MCAssembler11handleFixupERKNS_11MCAsmLayoutERNS_10MCFragmentERKNS_7MCFixupE+0xf2)[0x7f60b66d2ed2]
   
/lib64/libLLVM-10.so(_ZN4llvm11MCAssembler6layoutERNS_11MCAsmLayoutE+0x281)[0x7f60b66d40b1]
/lib64/libLLVM-10.so(_ZN4llvm11MCAssembler6FinishEv+0x3d)[0x7f60b66d42ad]
   
/lib64/libLLVM-10.so(_ZN4llvm10AsmPrinter14doFinalizationERNS_6ModuleE+0x731)[0x7f60b5c64b11]
   
/lib64/libLLVM-10.so(_ZN4llvm13FPPassManager14doFinalizationERNS_6ModuleE+0x65)[0x7f60b5658895]
   
/lib64/libLLVM-10.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x460)[0x7f60b5664220]
/lib64/libclang-cpp.so.10(+0x16123e1)[0x7f60baea73e1]
   
/lib64/libclang-cpp.so.10(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x2fe)[0x7f60baea805e]
/lib64/libclang-cpp.so.10(+0x190fb39)[0x7f60bb1a4b39]
   
/lib64/libclang-cpp.so.10(_ZN5clang8ParseASTERNS_4SemaEbb+0x499)[0x7f60ba208c09]
   
/lib64/libclang-cpp.so.10(_ZN5clang14FrontendAction7ExecuteEv+0xb9)[0x7f60bb83c139]
   
/lib64/libclang-cpp.so.10(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x1cd)[0x7f60bb7f827d]
   
/lib64/libclang-cpp.so.10(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x95c)[0x7f60bb8b212c]
   
/usr/bin/clang++(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x6c0)[0x55988c5f1440]
/usr/bin/clang++(+0x15a94)[0x55988c5efa94]
/lib64/libclang-cpp.so.10(+0x1c8cec9)[0x7f60bb521ec9]
   
/lib64/libLLVM-10.so(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0x27)[0x7f60b549b5e7]
   
/lib64/libclang-cpp.so.10(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x157)[0x7f60bb524537]
   
/lib64/libclang-cpp.so.10(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x9d)[0x7f60bb4f8bed]
   
/lib64/libclang-cpp.so.10(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7Command+0x86)[0x7f60bb4f9156]
   
/lib64/libclang-cpp.so.10(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7Command+0x93)[0x7f60bb501693]
/usr/bin/clang++(main+0x14a6)[0x55988c5ebb86]
/lib64/libc.so.6(__libc_start_main+0xf2)[0x7f60b4766042]
/usr/bin/clang++(_start+0x2e)[0x55988c5ecc1e]

also checked through godbolt: crashes in clang 11 and clang trunk, clang 12
doesn't crash but prints errors.

None of these commands crash:
clang++ coro-crash.cpp -std=c++20 -stdlib=libc++ -fsanitize=undefined
-emit-llvm -Xclang -disable-llvm-passes -c
clang++ coro-crash.cpp -std=c++20 -stdlib=libc++ -fsanitize=undefined
-emit-llvm -Xclang -c

by https://llvm.org/docs/HowToSubmitABug.html#crashing-bugs I deduced that it's
a backend bug (as if it wasn't obvious by

[llvm-bugs] [Bug 50324] wrong code at -Os and above on x86_64-linux-gnu

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50324

Sanjay Patel  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
 CC||spatel+l...@rotateright.com

--- Comment #1 from Sanjay Patel  ---
This reduces to just about the same test as bug 50341.
That example is a bit simpler (no loops), and I started looking at that first,
so I'm making this one a duplicate even though it was filed first.

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

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


[llvm-bugs] [Bug 50341] wrong code at -Os and above on x86_64-linux-gnu

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50341

Sanjay Patel  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Sanjay Patel  ---
Thanks for finding the bug and easy reproducer!

Should be fixed with:
https://reviews.llvm.org/rGe82db87fb102

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


[llvm-bugs] [Bug 50346] New: Implicitly-defined default constructor not generated for nested class

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50346

Bug ID: 50346
   Summary: Implicitly-defined default constructor not generated
for nested class
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: alex.franc...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

Code sample:

#include 

struct Outer {
struct Inner {
int a = 0;
};
std::optional inner;
};

int main() {
Outer o;
o.inner.emplace();
return 0;
}

https://godbolt.org/z/jKoG9a7e4


In the above, the `emplace()` call causes an error, stating that the class
(`Outer::Inner`) does not have a constructor that matches the arguments. Note
that this is specifically an issue in combination with libstdc++'s impl of
std::optional; libc++ (since clang 9) seems to work (though prior to clang 9 it
generates the same error).

If you do `std::optional`, it also fails (though it will succeed
if you remove the `inner` member).

If you change `int a = 0` to `int a` (without the default value), it will
succeed.

If you add an `Inner() = default`, it still fails, however adding `Inner() {}`
will make it succeed.

This may be loosely related to bug 15886.

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


[llvm-bugs] [Bug 50347] New: Mapping of global scope deep object fails

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50347

Bug ID: 50347
   Summary: Mapping of global scope deep object fails
   Product: OpenMP
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Runtime Library
  Assignee: unassignedb...@nondot.org
  Reporter: jtr...@anl.gov
CC: llvm-bugs@lists.llvm.org

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

The code for this bug report is available here: 

https://github.com/jtramm/omp_target_issues/tree/master/global_test/class_A

When attempting to compile this code with clang++ for a V100 target I get the
following error:

clang++ -Wall -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target
-march=sm_70 -g -c main.cpp -o main.o
:0: error: expected relocatable expression
error: cannot compile inline asm
1 error generated.

The compiler version is:

$ clang++ --version
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
c82a0ae70e280c1c40b1af09ef275ddc7ed4254d)

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


[llvm-bugs] [Bug 50344] clang 12.0.0 ignores copy constructor and fails to compile seemingly correct code

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50344

Eli Friedman  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 CC||efrie...@quicinc.com
 Status|NEW |RESOLVED

--- Comment #1 from Eli Friedman  ---
I think you're misinterpreting "only the copy constructor is provided". 
There's a difference between a class that doesn't have a move constructor, and
one that has an explicitly deleted move constructor.  A class with a deleted
move constructor has a move constructor.  The compiler doesn't check whether a
constructor is deleted until after it decides which constructor to use.

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


[llvm-bugs] [Bug 50348] New: Enable modifiers on V_MOV_B32

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50348

Bug ID: 50348
   Summary: Enable modifiers on V_MOV_B32
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AMDGPU
  Assignee: unassignedb...@nondot.org
  Reporter: joseph.n...@amd.com
CC: llvm-bugs@lists.llvm.org

According to the spec, while specified to use arbitrary data formats, FP
modifiers (negation,absolute value, clamp and omod) are allowed on this
instruction. But the code does not allow this.

VOP1Instructions.td:181
defm V_MOV_B32 : VOP1Inst <"v_mov_b32", VOP_I32_I32>;

Part of the limitation is due to the use of a VOP_I32_I32 profile, which
disallows modifiers. 

Due to the use of MOV instructions explicitly in several AMDGPU backend passes,
additional checks may have to be added to those passes if modifiers are allowed
on V_MOV_B32

If enabled, this feature could perhaps result in more optimal code, when a
value needs to have modifiers applied.

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


[llvm-bugs] [Bug 50349] New: Create VOP3 encoding of V_READFIRSTLANE_B32

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50349

Bug ID: 50349
   Summary: Create VOP3 encoding of V_READFIRSTLANE_B32
   Product: libraries
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AMDGPU
  Assignee: unassignedb...@nondot.org
  Reporter: joseph.n...@amd.com
CC: llvm-bugs@lists.llvm.org

There is a TODO comment to do this enhancement as well in the tree. 

V_READFIRSTLANE_B32 currently only has a VOP1 encoding, but the hardware also
supports a VOP3 encoding. Refactoring the definition of the instruction to use
a VOP_Profile as most instructions do would make it easier to create a VOP3
encoding. 

Approximate line of definition, VOP1Instructions.td:182

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


[llvm-bugs] [Bug 27252] Missed vectorization of simple popcount loop

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=27252

Carrot  changed:

   What|Removed |Added

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

--- Comment #5 from Carrot  ---
Thanks for the fix!

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


[llvm-bugs] [Bug 46702] Illegal fragment fill size when using current address in size computation

2021-05-14 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=46702

Jian Cai  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #2 from Jian Cai  ---
A slightly reduced test case:

$cat foo.s 
1:
   jmp .
2:
.fill 1, (2b - 1b), 0


Double checking again GNU assembler also seemed to fail such code:

$ as --version
GNU assembler (GNU Binutils for Debian) 2.35.2

$ as foo.s -o gas.o
foo.s: Assembler messages:
foo.s:4: Error: bad or irreducible absolute expression
make: *** [makefile:9: gas] Error 1


Closing it as this seems to be consistent across assemblers. Please feel free
to reopen if I misunderstood your problem.

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