[llvm-bugs] [Bug 25022] A void* handler doesn't catch nullptr_t, violating 15.3p3.4

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=25022

Valentin-Catalin Chirca  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||valentin.chirca@windriver.c
   ||om
 Resolution|--- |FIXED

--- Comment #3 from Valentin-Catalin Chirca  ---
The following shows this is fixed starting with clang 3.9.0:

https://godbolt.org/z/Mbn47YTo6

-- 
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 25288] bug with variadic class friend functions

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=25288

Valentin-Catalin Chirca  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 CC||valentin.chirca@windriver.c
   ||om

--- Comment #2 from Valentin-Catalin Chirca  ---
The following shows this is fixed starting with clang 7.0.1:

https://godbolt.org/z/zzhYT4Y1h

-- 
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 25333] name mangling of lambda default arguments in explicitly instantiated template

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=25333

Valentin-Catalin Chirca  changed:

   What|Removed |Added

 CC||valentin.chirca@windriver.c
   ||om
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Valentin-Catalin Chirca  ---
The following shows this is fixed starting with clang 12.0.0:

https://godbolt.org/z/3oPhnv97Y

-- 
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 25429] Optimizing loop with sizeof("literal")

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=25429

Valentin-Catalin Chirca  changed:

   What|Removed |Added

 CC||valentin.chirca@windriver.c
   ||om
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Valentin-Catalin Chirca  ---
The following shows this is fixed starting with clang 9.0.0:

https://godbolt.org/z/vc6W1jxqq

-- 
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 51059] New: [C++4OpenCL] ICE on compiling new with multidimensional arrays

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51059

Bug ID: 51059
   Summary: [C++4OpenCL] ICE on compiling new with
multidimensional arrays
   Product: clang
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: OpenCL
  Assignee: unassignedclangb...@nondot.org
  Reporter: anastasia.stul...@arm.com
CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org

Calling new with multidimensional arrays triggers ICE in clang:

See test case:

void test_new_delete(void *buffer){
auto p1 = new (buffer) double[2][5];
}

with the invocation 'clang bug.clcpp' fails with:

clang-13: /data/llvm/llvm-project/clang/lib/AST/Expr.cpp:292: static
clang::ConstantExpr* clang::ConstantExpr::Create(const clang::ASTContext&,
clang::Expr*, clang::ConstantExpr::ResultStorageKind, bool): Assertion
`!isa(E)' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: /data/llvm/llvm-project/build/bin/clang-13 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-name bug.clcpp -mrelocation-model static
-mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/data/sw/libclcxx_new -resource-dir
/data/llvm/llvm-project/build/lib/clang/13.0.0 -internal-isystem
/data/llvm/llvm-project/build/lib/clang/13.0.0/include -internal-isystem
/usr/local/include -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../x86_64-linux-gnu/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir=/data/sw/libclcxx_new -ferror-limit 19
-finclude-default-header -fdeclare-opencl-builtins -fgnuc-version=4.2.1
-fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o
/tmp/bug-c4edbc.o -x clcpp bug.clcpp
1.  bug.clcpp:2:44: current parser token ';'
2.  bug.clcpp:1:36: parsing function body 'test_new_delete'
3.  bug.clcpp:1:36: in compound statement ('{}')
 #0 0x55bc3e7b5b66 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/data/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:0
 #1 0x55bc3e7b5c1d PrintStackTraceSignalHandler(void*)
/data/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:0
 #2 0x55bc3e7b38d1 llvm::sys::RunSignalHandlers()
/data/llvm/llvm-project/llvm/lib/Support/Signals.cpp:76:0
 #3 0x55bc3e7b54e7 SignalHandler(int)
/data/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:0
 #4 0x7f8383430980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #5 0x7f83820e1fb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x7f83820e3921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
 #7 0x7f83820d348a __assert_fail_base
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
 #8 0x7f83820d3502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
 #9 0x55bc43394fb9 clang::ConstantExpr::Create(clang::ASTContext const&,
clang::Expr*, clang::ConstantExpr::ResultStorageKind, bool)
/data/llvm/llvm-project/clang/lib/AST/Expr.cpp:293:0
#10 0x55bc43395088 clang::ConstantExpr::Create(clang::ASTContext const&,
clang::Expr*, clang::APValue const&)
/data/llvm/llvm-project/clang/lib/AST/Expr.cpp:305:0
#11 0x55bc4272e12f CheckConvertedConstantExpression(clang::Sema&,
clang::Expr*, clang::QualType, clang::APValue&, clang::Sema::CCEKind, bool,
clang::NamedDecl*)
/data/llvm/llvm-project/clang/lib/Sema/SemaOverload.cpp:5775:0
#12 0x55bc4272e5d1
clang::Sema::CheckConvertedConstantExpression(clang::Expr*, clang::QualType,
llvm::APSInt&, clang::Sema::CCEKind)
/data/llvm/llvm-project/clang/lib/Sema/SemaOverload.cpp:5814:0
#13 0x55bc42b6bf06 checkArraySize(clang::Sema&, clang::Expr*&,
llvm::APSInt&, unsigned int, bool)
/data/llvm/llvm-project/clang/lib/Sema/SemaType.cpp:2286:0
#14 0x55bc42b6cacf clang::Sema::BuildArrayType(clang::QualType,
clang::ArrayType::ArraySizeModifier, clang::Expr*, unsigned int,
clang::SourceRange, clang::DeclarationName)
/data/llvm/llvm-project/clang/lib/Sema/SemaType.cpp:2466:0
#15 0x55bc42b762a7 GetFullTypeForDeclarator((anonymous
namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*)
/data/llvm/llvm-project/clang/lib/Sema/SemaType.cpp:4958:0
#16 0x55bc42b79e8b clang::Sema::GetTypeForDeclarator(clang::Declarator&,
clang::Scope*) /data/llvm/llvm-project/clang/lib/Sema/SemaType.cpp:5743:0
#17 0x55bc423d2ee8 clang::Sema::ActOnCXXNew(clang::SourceLocation, bool,
clang::SourceLocation, llvm::MutableArrayRef,
clang::SourceLocation, clang::SourceRange, clang::Declarator&, clang::Expr*)
/data/l

[llvm-bugs] [Bug 45823] Missing vectorization of loop due to load late in the loop (unsupported first order recurrence)

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=45823

Mikael Holmén  changed:

   What|Removed |Added

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

--- Comment #2 from Mikael Holmén  ---
It seems that with commit aa00b1d76364:

[LV] Try to sink users recursively for first-order recurrences.

Update isFirstOrderRecurrence to  explore all uses of a recurrence phi
and check if we can sink them. If there are multiple users to sink, they
are all mapped to the previous instruction.

Fixes PR44286 (and another PR or two).

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D84951

the vectorizer doesn't bail out on the loop anymore.
Now we instead get

LV: Vectorization is possible but not beneficial.

and if adding e.g.
 -force-vector-width=2
the loop indeed gets vectorized.

Thanks!

-- 
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 51061] New: lld/mac should warn on under-aligned arm64 functions

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51061

Bug ID: 51061
   Summary: lld/mac should warn on under-aligned arm64 functions
   Product: lld
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: MachO
  Assignee: unassignedb...@nondot.org
  Reporter: nicolaswe...@gmx.de
CC: g...@fb.com, jezr...@gmail.com,
llvm-bugs@lists.llvm.org, smee...@fb.com

ld64 has this warning:

ld: warning: arm64 function not 4-byte aligned: _bar from
/Users/thakis/src/llvm-project/out/gn/obj/lld/test/MachO/Output/application-extension.s.tmp/bar.o

That seems like a useful warning, lld should have it 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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 36077 in oss-fuzz: llvm:clang-objc-fuzzer: Stack-overflow in clang::Sema::DiagnoseUseOfDecl

2021-07-12 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

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

ClusterFuzz testcase 5202560720961536 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202107110610:202107120611

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 50497] ICE with lambda capture & typeid of polymorphic class

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50497

Nathan Sidwell  changed:

   What|Removed |Added

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

--- Comment #1 from Nathan Sidwell  ---
Fixed by https://reviews.llvm.org/D103258

-- 
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 51062] New: compiler crashes due to internal error while compiling llvm

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51062

Bug ID: 51062
   Summary: compiler crashes due to internal error while compiling
llvm
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: release blocker
  Priority: P
 Component: Core LLVM classes
  Assignee: unassignedb...@nondot.org
  Reporter: george.kie...@altran.com
CC: llvm-bugs@lists.llvm.org

[1322/2763] Building CXX object
tools/clang/lib/StaticAnal...bj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o
FAILED:
tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o
/usr/bin/c++ -DCLANG_ROUND_TRIP_CC1_ARGS=ON -DGTEST_HAS_RTTI=0 -D_DEBUG
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-I/home/gkielty/llvm/llvm/build/tools/clang/lib/StaticAnalyzer/Checkers
-I/home/gkielty/llvm/llvm/clang/lib/StaticAnalyzer/Checkers
-I/home/gkielty/llvm/llvm/clang/include
-I/home/gkielty/llvm/llvm/build/tools/clang/include
-I/home/gkielty/llvm/llvm/build/include -I/home/gkielty/llvm/llvm/llvm/include
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wno-comment -Wmisleading-indentation -fdiagnostics-color -fno-common
-Woverloaded-virtual -fno-strict-aliasing -g  -fno-exceptions -fno-rtti
-std=c++14 -MD -MT
tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o
-MF
tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o.d
-o
tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o
-c
/home/gkielty/llvm/llvm/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.

-- 
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 51063] New: libclc cannot compile because of The LLAsm compiler "llvm-as" is not able to compile a simple test program.

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51063

Bug ID: 51063
   Summary: libclc cannot compile because of The LLAsm compiler
"llvm-as" is not able to compile a simple test
program.
   Product: libclc
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: release blocker
  Priority: P
 Component: All Bugs
  Assignee: unassignedb...@nondot.org
  Reporter: sylves...@debian.org
CC: llvm-bugs@lists.llvm.org, tstel...@redhat.com

Regression introduced between c6e4c1fbd80e..0da172b1766e

On Debian & Ubuntu on trunk:

cmake -DCMAKE_INSTALL_DATADIR=/usr/lib \
-DCMAKE_INSTALL_INCLUDEDIR=/usr/include \
-DLLVM_CONFIG=/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-config
\
-DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
Using cmake: cmake
-- The CXX compiler identification is GNU 7.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/g++-7 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
LLVM version: 13.0.0
LLVM system libs: 
LLVM libs: -lLLVM-13
LLVM libdir:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/lib
LLVM bindir:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin
LLVM ld flags:
-L/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/lib
LLVM cxx flags:
-I/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/llvm/include;-I/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/include;-std=c++14;;;-fno-exceptions;-D_GNU_SOURCE;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS;-fno-rtti;-fno-exceptions

clang:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/clang
llvm-as:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as
llvm-link:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-link
opt:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/opt
llvm-spirv: LLVM_SPIRV-NOTFOUND

-- Check for working CLC compiler:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/clang
-- Check for working CLC compiler:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/clang
-- works
-- Check for working LLAsm compiler:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as
-- Check for working LLAsm compiler:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as
-- broken
CMake Error at cmake/CMakeTestLLAsmCompiler.cmake:40 (message):
  The LLAsm compiler
 
"/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir:
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/libclc/build/CMakeFiles/CMakeTmp



  Run Build Command(s):/usr/bin/make cmTC_9bcb9/fast && make[2]: Entering
  directory
 
'/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/libclc/build/CMakeFiles/CMakeTmp'


  /usr/bin/make -f CMakeFiles/cmTC_9bcb9.dir/build.make
  CMakeFiles/cmTC_9bcb9.dir/build

  make[3]: Entering directory
 
'/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/libclc/build/CMakeFiles/CMakeTmp'


  Building LLAsm object CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc


 
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/clang
  -E -P -x cl
 
"/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/libclc/build/CMakeFiles/CMakeTmp/testLLAsmCompiler.ll"
  -o CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc.temp


 
"/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as"
  -o CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc
  CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc.temp


 
/build/llvm-toolchain-snapshot-13~++20210712091412+d3e14fafc69a/build-llvm/tools/clang/stage2-bins/bin/llvm-as:
  CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc.temp:1:1: error: expected
  top-level entity

  typedef unsigned char uchar;

  ^

  CMakeFiles/cmTC_9bcb9.dir/build.make:84: recipe for target
  'CMakeFiles/cmTC_9bcb9.dir/testLLAsmCompiler.bc' failed

  make[3]: *** [CMakeFiles/cmTC_9bcb9.d

[llvm-bugs] [Bug 51064] New: ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll is flaky

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51064

Bug ID: 51064
   Summary: ExecutionEngine/OrcLazy/multiple-compile-threads-basic
.ll is flaky
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: OrcJIT
  Assignee: unassignedb...@nondot.org
  Reporter: nicolaswe...@gmx.de
CC: 1101.deb...@gmail.com, llvm-bugs@lists.llvm.org

I saw it fail twice recently, but didn't see it fail ever before. So this might
be a new thing.

http://45.33.8.238/mac/33411/step_11.txt , at rev f192616ce983, 2021 Jun 12

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8842029280494205536/+/u/package_clang/stdout?format=raw
, at rev d5c0b9c84886 , 2021 Jun 11




  Some tests will be skipped and the --timeout command line argument will not
work.
 -- Testing: 72841 tests, 12 workers --
 Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60..
 FAIL: LLVM :: ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll (49812
of 72841)
  TEST 'LLVM ::
ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll' FAILED

 Script:
 --
 : 'RUN: at line 1';  
/opt/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/bin/lli
-jit-kind=orc-lazy -compile-threads=2 -thread-entry hello
/opt/s/w/ir/cache/builder/src/third_party/llvm/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
| /opt/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/bin/FileCheck
/opt/s/w/ir/cache/builder/src/third_party/llvm/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
 --
 Exit Code: 2

 Command Output (stderr):
 --
 FileCheck error: '' is empty.
 FileCheck command line: 
/opt/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/bin/FileCheck
/opt/s/w/ir/cache/builder/src/third_party/llvm/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll

-- 
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 36079 in oss-fuzz: llvm:clang-fuzzer: Stack-overflow in clang::Sema::getPrintingPolicy

2021-07-12 Thread ClusterFuzz-External via monorail via llvm-bugs
Updates:
Labels: ClusterFuzz-Verified
Status: Verified

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

ClusterFuzz testcase 5832769136623616 is verified as fixed in 
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=202107110610:202107120611

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 49283] Support LC_DATA_IN_CODE

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=49283

Jez Ng  changed:

   What|Removed |Added

 Fixed By Commit(s)||https://reviews.llvm.org/rG
   ||928394d10918c97880ef36e4e98
   ||53888b0d55207
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #3 from Jez Ng  ---
Yup

-- 
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 50812] "Invalid symbol type" while parsing a valid framework archive

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50812

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


[llvm-bugs] [Bug 50782] fatal error: error in backend: Stack cannot be empty!

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50782

Craig Topper  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 Fixed By Commit(s)||d5c97f4bf0449f8a4ad6260c75c
   ||bf6ff3605ac04

--- Comment #22 from Craig Topper  ---
Should be fixed after d5c97f4bf0449f8a4ad6260c75cbf6ff3605ac04

-- 
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 50657] `llvm-strip -x` crashes on binary linked by lld/mac, works fine on binary linked by ld64

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=50657

Nico Weber  changed:

   What|Removed |Added

 Fixed By Commit(s)||https://reviews.llvm.org/rG
   ||54418c5a355eda7ff77a221c692
   ||ee90944c25196
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Nico Weber  ---
Hey, https://reviews.llvm.org/rG54418c5a355eda7ff77a221c692ee90944c25196 fixed
this too.

(The change in comment 3 might still be a good idea though.)

-- 
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 51065] New: ICE at the reduction of complex numbers in OpenMP offload

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51065

Bug ID: 51065
   Summary: ICE at the reduction of complex numbers in OpenMP
offload
   Product: OpenMP
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Clang Compiler Support
  Assignee: unassignedclangb...@nondot.org
  Reporter: xw111lu...@gmail.com
CC: llvm-bugs@lists.llvm.org

ightly test starts to fail since sunday 2021-07-11 06:33:02 UTC

https://github.com/ye-luo/openmp-target/blob/master/tests/complex/complex_reduction.cpp

clang++ -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target -march=sm_60 -O3
complex_reduction.cpp

sm_70 and sm_80 works fine

see full error


clang-13:
/home/ci/ecp/working/jlselogin3/batch-03/intel-dga/automatedtests/yeluo/test_llvm/builds/users/yeluo/NFStdQBJ/0/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/llvm/include/llvm/IR/InstrTypes.h:2297:
llvm::Value *llvm::CallBase::getOperand(unsigned int) const: Assertion
`i_nocapture < OperandTraits::operands(this) && "getOperand() out of
range!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: /soft/compilers/llvm/main-20210712/bin/clang-13 -cc1
-triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -S -disable-free
-main-file-name complex_reduction.cpp -mrelocation-model pic -pic-level 2
-fhalf-no-semantic-interposition -mframe-pointer=all -fno-rounding-math
-fno-verbose-asm -no-integrated-as -mlink-builtin-bitcode
/soft/compilers/cuda/cuda-11.0.2/nvvm/libdevice/libdevice.10.bc -target-feature
+ptx70 -target-sdk-version=11.0 -mlink-builtin-bitcode
/soft/compilers/llvm/main-20210712/lib/libomptarget-nvptx-sm_60.bc -target-cpu
sm_60 -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb
-resource-dir /soft/compilers/llvm/main-20210712/lib/clang/13.0.0
-internal-isystem
/soft/compilers/llvm/main-20210712/lib/clang/13.0.0/include/openmp_wrappers
-include __clang_openmp_device_functions.h -c-isystem
/soft/compilers/cuda/cuda-11.0.2/include -c-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/libxml2-2.9.9-2yk5s47fz25ngwxye6jx6ukvntdnb4af/include
-c-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/xz-5.2.5-6rgt4w7in65lwhal6husiesraanx4dou/include
-c-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/libiconv-1.16-zqp7gscw3ojfabhhzbeco7t26fuwypol/include
-c-isystem
/soft/packaging/spack-builds/linux-opensuse_leap15-x86_64/gcc-10.2.0/hdf5-1.10.7-uapcktd3szlmtouy63p4o3nofnsj5au6/include
-cxx-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/libxml2-2.9.9-2yk5s47fz25ngwxye6jx6ukvntdnb4af/include
-cxx-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/xz-5.2.5-6rgt4w7in65lwhal6husiesraanx4dou/include
-cxx-isystem
/soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/libiconv-1.16-zqp7gscw3ojfabhhzbeco7t26fuwypol/include
-cxx-isystem
/soft/packaging/spack-builds/linux-opensuse_leap15-x86_64/gcc-10.2.0/hdf5-1.10.7-uapcktd3szlmtouy63p4o3nofnsj5au6/include
-internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7
-internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/x86_64-suse-linux
-internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/backward
-internal-isystem /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7
-internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/x86_64-suse-linux
-internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/backward
-internal-isystem /soft/compilers/llvm/main-20210712/lib/clang/13.0.0/include
-internal-isystem /usr/local/include -internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-internal-isystem /soft/compilers/llvm/main-20210712/lib/clang/13.0.0/include
-internal-isystem /usr/local/include -internal-isystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdeprecated-macro -fno-dwarf-directory-asm
-fdebug-compilation-dir=/home/yeluo/opt/openmp-target/tests/complex
-ferror-limit 19 -fopenmp -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions
-fcolor-diagnostics -vectorize-loops -vectorize-slp -fopenmp-is-device
-fopenmp-host-ir-file-path /tmp/complex_reduction-07c028.bc
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/complex_reduction-1524ec.s -x c++
complex_reduction.cpp
1.   parser at end of file
2.  Optimizer
 #0 0x02c2c1c3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/soft/compilers/llvm/main-20210712/bin/clang-13+0x2c2c1c3)
 #1 0x02c29ed

[llvm-bugs] [Bug 51066] New: [x86] Assertion failed: ((EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >> EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that doesn't fit

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51066

Bug ID: 51066
   Summary: [x86] Assertion failed: ((EltVT.getSizeInBits() >= 64
|| (uint64_t)((int64_t)Val >> EltVT.getSizeInBits()) +
1 < 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"), function getConstant, file
SelectionDAG.cpp, line 1188.
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: dimi...@andric.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

As reported in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257132, clang
asserts when cross-building for an i386 target on amd64:

Assertion failed: ((EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >>
EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"), function getConstant, file
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp,
line 1337.

Minimize test case:

// clang -cc1 -triple i386-- -S -O1 kern_mbuf-min.c
int a;
struct b {
  int c;
  char d[-sizeof(0)];
  int e;
} f();
void g() {
  struct b *h = (struct b *)a;
  if (h->e)
f();
}

Note that setting the target to x86_64 makes the assertion go away, and shows
an (expected) error message instead:

kern_mbuf-min.c:5:10: error: array is too large (18446744073709551612 elements)
  char d[-sizeof(0)];
 ^~
kern_mbuf-min.c:9:17: warning: cast to 'struct b *' from smaller integer type
'int' [-Wint-to-pointer-cast]
  struct b *h = (struct b *)a;
^
1 warning and 1 error generated.

I have tested this with various versions of clang, and even the oldest I had
lying around (clang 3.1, trunk r15!) gave the same assertion...

-- 
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 51067] New: [ThinLTO] linkonce_odr function is incorrectly not discarded from global_ctors

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51067

Bug ID: 51067
   Summary: [ThinLTO] linkonce_odr function is incorrectly not
discarded from global_ctors
   Product: lld
   Version: 12.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: ELF
  Assignee: unassignedb...@nondot.org
  Reporter: jbc.enge...@gmail.com
CC: llvm-bugs@lists.llvm.org, smithp...@googlemail.com

With LDC, we want to emit a global ctor function that is only called once for
each DSO. We do this by emitting it as "linkonce_odr" in every IR module,
adding it to global_ctors, are relying on LangRef "If the third field is
non-null, and points to a global variable or function, the initializer function
will only run if the associated data from the current module is not discarded."
to discard it from global_ctors when it is merged with the identical function
in other IR modules.
This works across several linkers, also works with LLD, but does not work with
LLD+ThinLTO.


Reproducing test case:

Our main file that defines a ctor, linkonce_odr, and adds it to the
global_ctors list, referencing itself as "data". This means that when the ctor
is discarded, the global_ctors entry should also be discarded.
```
; File: main.ll
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@str.ctor = private unnamed_addr constant [6 x i8] c"ctor\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void
()*, i8* } { i32 65535, void ()* @module_ctor, i8* bitcast (void ()*
@module_ctor to i8*) }]

declare i32 @printf(i8*, ...)

define linkonce_odr hidden void @module_ctor() {
  %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x
i8]* @str.ctor, i64 0, i64 0))
  ret void
}

define i32 @main(i32 %argc_arg, i8** %argv_arg) {
  ret i32 0
}
```

A second file that defines the _same_ ctor function, linkonce_odr. We compile
this file directly to object code, not to bitcode (i.e. no LTO capability on
this file). This file also adds the ctor to global_ctors list, again
referencing itself as "data". LangRef: "If the third field is non-null, and
points to a global variable or function, the initializer function will only run
if the associated data from the current module is not discarded.".
```
; File: second_object.ll
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@str.ctor = private unnamed_addr constant [6 x i8] c"ctor\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void
()*, i8* } { i32 65535, void ()* @module_ctor, i8* bitcast (void ()*
@module_ctor to i8*) }]

declare i32 @printf(i8*, ...)

define linkonce_odr hidden void @module_ctor() {
  %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x
i8]* @str.ctor, i64 0, i64 0))
  ret void
}
```

Script file to build and reproduce:
```
# File: script.sh
LLC=/home/johan/llvm/install12/bin/llc
OPT=/home/johan/llvm/install12/bin/opt
LLVMgold=/home/johan/llvm/install12/lib/LLVMgold.so

$LLC second_object.ll -O3 --relocation-model=pic -filetype=obj -o
second_object.o
$LLC main.ll -O3 --relocation-model=pic -filetype=obj -o main.o
cc main.o second_object.o -fuse-ld=gold -o bug_gold
cc main.o second_object.o -fuse-ld=lld -o bug_lld

$OPT main.ll -O3 -o main_thinlto.o
cc main_thinlto.o second_object.o -o bug_thinlto_gold -fuse-ld=gold
-Wl,-plugin,$LLVMgold -Wl,-plugin-opt=thinlto
-Wl,-plugin-opt=-function-sections -Wl,-plugin-opt=-data-sections

$OPT main.ll -O3 -o main_thinlto.o
cc main_thinlto.o second_object.o -o bug_thinlto_lld -fuse-ld=lld
#-Wl,-plugin,$LLVMgold -Wl,-plugin-opt=thinlto
-Wl,-plugin-opt=-function-sections -Wl,-plugin-opt=-data-sections

echo "bug_gold:"
./bug_gold
echo "bug_lld:"
./bug_lld
echo "bug_thinlto_gold:"
./bug_thinlto_gold
echo "bug_thinlto_lld:"
./bug_thinlto_lld
```

Output:
```
❯ ./script.sh
bug_gold:
ctor
bug_lld:
ctor
bug_thinlto_gold:
ctor
bug_thinlto_lld:
ctor
ctor
```

The double "ctor" at the end for bug_thinlto_lld is the bug.
Tested with LLVM 12.

-- 
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 51068] New: [X86][SSE] Failure to merge scalar float comparison results

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51068

Bug ID: 51068
   Summary: [X86][SSE] Failure to merge scalar float comparison
results
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, pengfei.w...@intel.com,
spatel+l...@rotateright.com

https://simd.godbolt.org/z/vWb57hqzx

#include 

bool cmp2_eq(float x, float y, float z, float w) {
return (x == y) == (z == w);
}

define zeroext i1 @cmp2_eq(float %0, float %1, float %2, float %3) {
  %5 = fcmp une float %0, %1
  %6 = fcmp oeq float %2, %3
  %7 = xor i1 %5, %6
  ret i1 %7
}

cmp2:
ucomiss %xmm1, %xmm0
setp%al
setne   %cl
orb %al, %cl
ucomiss %xmm3, %xmm2
setnp   %dl
sete%al
andb%dl, %al
xorb%cl, %al
retq

We should be able to use cmpss (or cmpsd for doubles) and merge the results to
reduce fpu->gpr traffic and branch density.

Compare to vectors:

__v4si cmp2_eq(__v4sf x, __v4sf y, __v4sf z, __v4sf w) {
return (x == y) == (z == w);
}

define <4 x i32> @cmp2_(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x
float> %3) {
  %5 = fcmp une <4 x float> %0, %1
  %6 = fcmp oeq <4 x float> %2, %3
  %7 = xor <4 x i1> %6, %5
  %8 = sext <4 x i1> %7 to <4 x i32>
  ret <4 x i32> %8
}

cmp2_:
cmpneqps%xmm1, %xmm0
cmpeqps %xmm3, %xmm2
xorps   %xmm2, %xmm0
retq

-- 
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 51069] New: [X86] Failure to pull out common scaled address offset through select/cmov

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51069

Bug ID: 51069
   Summary: [X86] Failure to pull out common scaled address offset
through select/cmov
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, pengfei.w...@intel.com,
spatel+l...@rotateright.com

https://simd.godbolt.org/z/qsKWW1heG

void dec(int *base, long long offset, int sel) {
int *ptr0 = base + offset + 0;
int *ptr6 = base + offset + 6;
int *ptr = sel ? ptr0 : ptr6;
(*ptr)--;
}

define void @dec(i32* nocapture %0, i64 %1, i32 %2) {
  %4 = getelementptr inbounds i32, i32* %0, i64 %1
  %5 = getelementptr inbounds i32, i32* %4, i64 6
  %6 = icmp eq i32 %2, 0
  %7 = select i1 %6, i32* %5, i32* %4
  %8 = load i32, i32* %7, align 4, !tbaa !3
  %9 = add nsw i32 %8, -1
  store i32 %9, i32* %7, align 4, !tbaa !3
  ret void
}

dec:
leaq(%rdi,%rsi,4), %rax
leaq(%rdi,%rsi,4), %rcx
addq$24, %rcx
testl   %edx, %edx
cmovneq %rax, %rcx
addl$-1, (%rcx)
retq

We can reduce the number of complex LEA ops by pulling the common "%rsi,4"
scaled offset through the cmov and into the addl address:

dec:
leaq24(%rdi), %rcx
testl   %edx, %edx
cmovneq %rdi, %rcx
addl$-1, (%rcx,%rsi,4)
retq

This might be generally achievable by canonicalizing the gep-chain, but for now
I'm making this a X86 ticket.

-- 
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 51070] New: Forward declared literal type template arg error

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51070

Bug ID: 51070
   Summary: Forward declared literal type template arg error
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++2a
  Assignee: unassignedclangb...@nondot.org
  Reporter: nat...@acm.org
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

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

Using a forward declared literal type in a forward declaration of a template
leads to (at best) a confusing error when the template is defined. Clang claims
the parameter has a different type in the two template declarations.  I've not
checked the std, but IMHO either the forward declaration 
  template struct S;
should be rejected as Literal is incomplete, or the later redeclaration of that
template is valid.  Note we don't instantiate S until Literal is defined.

(1)bester:14>bin/clang++ -std=c++20 -c a.cc -DNO_REDECL
bester:15>bin/clang++ -std=c++20 -c a.cc
a.cc:5:18: error: non-type template parameter has incomplete type 'Literal'
template struct S;
 ^
a.cc:2:8: note: forward declaration of 'Literal'
struct Literal;
   ^
a.cc:13:18: error: template non-type parameter has a different type 'Literal'
in template redeclaration
template
 ^
a.cc:5:18: note: previous non-type template parameter with type 'int' is here
template struct S;
 ^
a.cc:18:6: error: implicit instantiation of undefined template 'S<1>'
S<1> x ;
 ^
a.cc:5:30: note: template is declared here
template struct S;
 ^

-- 
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 51071] New: llvm/utils/lit/tests/selecting.py is flaky

2021-07-12 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=51071

Bug ID: 51071
   Summary: llvm/utils/lit/tests/selecting.py is flaky
   Product: new-bugs
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: nicolaswe...@gmx.de
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

It fails every now and then, e.g. here:
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8841871100326575856/+/u/package_clang/stdout?format=raw

 --
 Exit Code: 2

 Command Output (stdout):
 --
 $ ":" "RUN: at line 1"
 $ "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefix=CHECK-BASIC"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 7"
 $ "not" "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/nonexistent"
 $ "FileCheck" "--check-prefix=CHECK-BAD-PATH"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 8"
 $ "not" "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/nonexistent"
"--allow-empty-runs"
 $ "FileCheck" "--check-prefix=CHECK-BAD-PATH"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 14"
 $ "not" "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py" "--filter"
"nonexistent"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ERROR"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 15"
 $ "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py" "--filter"
"nonexistent" "--allow-empty-runs"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ALLOW"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 16"
 $ "not" "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py"
"--filter-out" ".*"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ERROR"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 17"
 $ "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py"
"--filter-out" ".*" "--allow-empty-runs"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ALLOW"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 24"
 $ "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py" "--filter"
"o[a-z]e"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefix=CHECK-FILTER"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 25"
 $ "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/bin/python3.8"
"/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/utils/lit/lit.py" "--filter"
"O[A-Z]E"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/Inputs/discovery"
 $ "FileCheck" "--check-prefix=CHECK-FILTER"
"/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/utils/lit/tests/selecting.py"
 $ ":" "RUN: at line 26"
 $ "env" "LIT_FILTER=o[a-z]e" "env" "-u" "FILECHECK_OPTS"
"/b/s/w/ir/cipd_bin_packages/cpython3/b