[llvm-bugs] [Bug 32999] New: Missed vpadd combine opportunity
https://bugs.llvm.org/show_bug.cgi?id=32999 Bug ID: 32999 Summary: Missed vpadd combine opportunity Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: Backend: ARM Assignee: unassignedb...@nondot.org Reporter: zvi.racko...@intel.com CC: llvm-bugs@lists.llvm.org This came up as a regression in ARM codegen in D32993. For the following case, define void @test(<16 x i8> *%cbcr, <4 x i16> *%X) nounwind ssp { %tmp = load <16 x i8>, <16 x i8>* %cbcr %tmp1 = zext <16 x i8> %tmp to <16 x i16> %tmp2 = shufflevector <16 x i16> %tmp1, <16 x i16> undef, <8 x i32> %tmp2a = shufflevector <8 x i16> %tmp2, <8 x i16> undef, <4 x i32> %tmp3 = shufflevector <16 x i16> %tmp1, <16 x i16> undef, <8 x i32> %tmp3a = shufflevector <8 x i16> %tmp3, <8 x i16> undef, <4 x i32> %add = add <4 x i16> %tmp2a, %tmp3a store <4 x i16> %add, <4 x i16>* %X, align 8 ret void } llc -mtriple=arm-eabi -mattr=+neon -o - -lower-interleaved-accesses=false vld1.64 {d16, d17}, [r0] vmovl.u8q8, d16 vuzp.16 q8, q9 vadd.i16d16, d16, d18 vstrd16, [r1] mov pc, lr This could be improved to: vld1.64 {d16, d17}, [r0] vmovl.u8q8, d16 vpadd.i16 d16, d16, d17 vstrd16, [r1] mov pc, lr -- 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 33000] New: `std::visit` with zero variants is broken
https://bugs.llvm.org/show_bug.cgi?id=33000 Bug ID: 33000 Summary: `std::visit` with zero variants is broken Product: libc++ Version: unspecified Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: mcyp...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com The following code is broken: std::visit([]{}); -- 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 33000] `std::visit` with zero variants is broken
https://bugs.llvm.org/show_bug.cgi?id=33000 Eric Fiselier changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED CC||e...@efcs.ca --- Comment #2 from Eric Fiselier --- r302773 -- 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 33001] New: masked gather/scatter/load/store intrinsics crash compiler with -O0 option when not supported by target
https://bugs.llvm.org/show_bug.cgi?id=33001 Bug ID: 33001 Summary: masked gather/scatter/load/store intrinsics crash compiler with -O0 option when not supported by target Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: ayman.m...@intel.com CC: llvm-bugs@lists.llvm.org Created attachment 18429 --> https://bugs.llvm.org/attachment.cgi?id=18429&action=edit Reproducer for the crash Reproducer attached. run command: llc -O0 -mtriple=x86_64-unknown-linux-gnu -mattr=+sse,+sse2 reproducer.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 http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 32664] [ELF] - LLD segfaults when assigns absolute value of symbol
https://bugs.llvm.org/show_bug.cgi?id=32664 George Rimar changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from George Rimar --- Fixed in r302668 (we do not support this case and report a error). -- 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 33002] New: [modules] error: constant expression not a constant expression (part II)
https://bugs.llvm.org/show_bug.cgi?id=33002 Bug ID: 33002 Summary: [modules] error: constant expression not a constant expression (part II) Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Modules Assignee: unassignedclangb...@nondot.org Reporter: gonzalob...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Created attachment 18430 --> https://bugs.llvm.org/attachment.cgi?id=18430&action=edit Testcase Given the following files: - include/module_a.hpp - include/module_b.hpp - include/module_c.hpp - include/module.modulemap - test.cpp compiling test.cpp with: clang++ -std=c++1z -fmodules -gmodules -fno-implicit-module-maps -Iinclude -fmodule-map-file=include/module.modulemap -fmodule-map-file=/path/to/libcxx/c++/v1/module.modulemap -fmodules-cache-path=module.cache test.cpp fails with the following error: hile building module 'module_c' imported from test.cpp:1: In file included from :1: include/module_c.hpp:12:33: error: non-type template argument is not a constant expression template > ^ include/module_c.hpp:15:40: note: while checking a default template argument used here using node_idx = baz; ~~^ include/module_c.hpp:12:33: note: initializer of 'highest' is not a constant expression template > ^ include/module_a.hpp:10:26: note: declared here static const constexpr T highest = std::numeric_limits::max(); ^ /include/c++/v1/limits:212:85: note: subexpression not valid in a constant expression _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;} ^ /include/c++/v1/limits:449:85: note: in call to 'max()' _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} ^ include/module_a.hpp:10:36: note: in call to 'max()' static const constexpr T highest = std::numeric_limits::max(); ^ test.cpp:1:10: fatal error: could not build module 'module_c' #include ^ 2 errors generated. include/module_a.hpp: #pragma once #include namespace module_a { template static const constexpr T highest = std::numeric_limits::max(); } // namespace module_a include/module_b.hpp: #pragma once #include namespace module_b { template struct if__ { using type = A; }; template struct if__ { using type = B; }; template using if_ = typename if__::type; // clang-format off template using smallest_size_t = if_<(N < module_a::highest), char, if_<(N < module_a::highest), unsigned long long, std::size_t>>; // clang-format on } // namespace module_b include/module_c.hpp: #pragma once #include #include #include namespace module_c { template struct foo {}; template struct bar {}; template > using baz = bar>; using node_idx = baz; } // namespace module_c include/module.modulemap: module module_b { header "module_b.hpp" export * } module module_a { header "module_a.hpp" export * } module module_c { header "module_c.hpp" export * } test.cpp: #include int main() { 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 33003] New: Linux::getSupportedSanitizers logic bug
https://bugs.llvm.org/show_bug.cgi?id=33003 Bug ID: 33003 Summary: Linux::getSupportedSanitizers logic bug Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: ste...@uplinklabs.net CC: llvm-bugs@lists.llvm.org Noticed due to new warnings in GCC 7.1.1: [3005/4646] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains/Linux.cpp.o ../tools/clang/lib/Driver/ToolChains/Linux.cpp: In member function ‘virtual clang::SanitizerMask clang::driver::toolchains::Linux::getSupportedSanitizers() const’: ../tools/clang/lib/Driver/ToolChains/Linux.cpp:868:40: warning: enum constant in boolean context [-Wint-in-bool-context] llvm::Triple::thumb || llvm::Triple::armeb || ^ ../tools/clang/lib/Driver/ToolChains/Linux.cpp:868:63: warning: enum constant in boolean context [-Wint-in-bool-context] llvm::Triple::thumb || llvm::Triple::armeb || ^ ../tools/clang/lib/Driver/ToolChains/Linux.cpp:869:40: warning: enum constant in boolean context [-Wint-in-bool-context] llvm::Triple::thumbeb; ^~~ This should fix it: diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp index 50443a1252..6708505d75 100644 --- a/lib/Driver/ToolChains/Linux.cpp +++ b/lib/Driver/ToolChains/Linux.cpp @@ -865,8 +865,9 @@ SanitizerMask Linux::getSupportedSanitizers() const { const bool IsAArch64 = getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::aarch64_be; const bool IsArmArch = getTriple().getArch() == llvm::Triple::arm || - llvm::Triple::thumb || llvm::Triple::armeb || - llvm::Triple::thumbeb; + getTriple().getArch() == llvm::Triple::thumb || + getTriple().getArch() == llvm::Triple::armeb || + getTriple().getArch() == llvm::Triple::thumbeb; SanitizerMask Res = ToolChain::getSupportedSanitizers(); Res |= SanitizerKind::Address; Res |= SanitizerKind::Fuzzer; -- 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 4802] -Wcast-qual not implemented
https://bugs.llvm.org/show_bug.cgi?id=4802 Roman changed: What|Removed |Added Status|RESOLVED|REOPENED CC||lebedev...@gmail.com Resolution|FIXED |--- --- Comment #4 from Roman --- (In reply to Timo Sirainen from comment #0) > int main(void) > { > const char *x = 0; > char *y = (char *)x; > return 0; > } > > gcc -Wcast-qual warns: > > test.c:4: warning: cast discards qualifiers from pointer target type > > clang warns nothing. clang-4.0 still does not warn on that. https://godbolt.org/g/3SEdPm -- 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 14657] Poor AVX code generation on 8xi1 masks
https://bugs.llvm.org/show_bug.cgi?id=14657 Sanjay Patel changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #17 from Sanjay Patel --- Resolving as fixed because we solved the main problem in the description, and we have separate bugs (see related) to track the remaining issues. -- 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 30847] No completions for template class member within template class (T forwarded)
https://bugs.llvm.org/show_bug.cgi?id=30847 Alex Lorenz changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED CC||arpha...@gmail.com --- Comment #2 from Alex Lorenz --- Fixed in r302797. -- 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 33004] New: printf with floating point arguments using -mno-sse2 flag is crashing
https://bugs.llvm.org/show_bug.cgi?id=33004 Bug ID: 33004 Summary: printf with floating point arguments using -mno-sse2 flag is crashing Product: new-bugs Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: ziv.iz...@intel.com CC: llvm-bugs@lists.llvm.org clang crashes while compiling with the flag -mno-sse2 on linux the following code: #include int main() { printf("%f", 2.0); return 0; } clang -mno-sse2 test.c output: clang-4.0: /export/iusers/ziv/llvm2/llvm/lib/Target/X86/X86FloatingPoint.cpp:303: unsigned int getFPReg(const llvm::MachineOperand&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed. and backtrace -- 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 33005] New: LLVM Cross Compile for AARCH64 failing to find ARM intrinsics
https://bugs.llvm.org/show_bug.cgi?id=33005 Bug ID: 33005 Summary: LLVM Cross Compile for AARCH64 failing to find ARM intrinsics Product: new-bugs Version: 4.0 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: mboudre...@panicbuttongames.com CC: llvm-bugs@lists.llvm.org When using cross compile with an Arch of "aarch64" and feature "+neon" (or simply setting the target CPU to cortex-a57), and providing it a simple application that does an rsqrt will fail with the following error: LLVM ERROR: Cannot select: intrinsic %llvm.arm.neon.vrsqrts cortex-a57 does support that intrinsic, but it appears LLVM is looking only at the llvm.aarch64 intrinsics table without also checking the llvm.arm table. -- 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 32577] "LLVM ERROR: MD_associated operand is not ValueAsMetadata" while building compiler-rt tests with lto and lld
https://bugs.llvm.org/show_bug.cgi?id=32577 Reid Kleckner changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #13 from Reid Kleckner --- Evgeniy landed the fix in r302203. It's generally uninteresting to build compiler-rt with LTO, so no, I don't think we want to continuously test this. In fact, I thought Bob disabled LTO in compiler-rt? If we want better LTO+sanitizer testing, we should set up a buildbot that does just that. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33007] New: Merge r302639 into the 4.0 branch
https://bugs.llvm.org/show_bug.cgi?id=33007 Bug ID: 33007 Summary: Merge r302639 into the 4.0 branch Product: new-bugs Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: renato.go...@linaro.org CC: llvm-bugs@lists.llvm.org This issue has been seen in our automated release schedule because we're using containers which don't have /etc/fstab set. It's an isolated fix and introduces no new behaviour. -- 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 33008] New: clang fails if /proc/cpuinfo cannot be read
https://bugs.llvm.org/show_bug.cgi?id=33008 Bug ID: 33008 Summary: clang fails if /proc/cpuinfo cannot be read Product: clang Version: 4.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: millerhe...@johndeere.com CC: llvm-bugs@lists.llvm.org when using clang 4.0 in a chroot builds fail because the file /proc/cpuinfo does not exist. This is common setup when using icecream where you see errors like the following: 0:05.57 checking for the target C compiler... /usr/bin/clang 0:05.69 checking whether the target C compiler can be used... yes 0:05.69 checking the target C compiler version... 4.0.0 0:14.61 checking the target C compiler works... no 0:14.61 DEBUG: Creating `/tmp/conftest.mtiJyc.c` with content: 0:14.61 DEBUG: | 0:14.61 DEBUG: | int 0:14.61 DEBUG: | main(void) 0:14.61 DEBUG: | { 0:14.61 DEBUG: | 0:14.61 DEBUG: | ; 0:14.61 DEBUG: | return 0; 0:14.61 DEBUG: | } 0:14.61 DEBUG: Executing: `/usr/bin/icecc /usr/bin/clang -std=gnu99 -c /tmp/conftest.mtiJyc.c` 0:14.61 DEBUG: The command returned non-zero exit status 105. 0:14.61 DEBUG: Its error output was: 0:14.61 DEBUG: | Can't read /proc/cpuinfo: No such file or directory 0:14.61 DEBUG: | ICECC[6490] 10:54:26: Compiled on 10.247.28.122 0:14.61 ERROR: Failed compiling a simple C source with the target C compiler >From what I can tell this came in from: https://reviews.llvm.org/D25564. Kleckner: This seems like an LLVM bug. I'd rather LLVM didn't look in /proc, but I can't find an alternative. In any case, we shouldn't print to stderr for a successful build. Silently falling back to std::thread::hardware_concurrency() seems fine, which is what the code does. Teresa: Agreed, we should at least return -1 if we can't find /proc/cpuinfo (which will result in fallback to std::thread::hardware_concurrency()). The question I have is whether it should be silent or not - my understanding was that this file should exist in x86_64 Linux. But I am also wondering how you hit this, since reading through the github thread you linked indicated that this is not LTO or ThinLTO. Oh, I see now where it is being used to initialize the value of an option...if this is a file that will not always exist for Linux x86_64 then it needs to fall back silently. -- 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 33009] New: hexagon calling convention lowering miscompiles passing empty classes in C++
https://bugs.llvm.org/show_bug.cgi?id=33009 Bug ID: 33009 Summary: hexagon calling convention lowering miscompiles passing empty classes in C++ Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: LLVM Codegen Assignee: kparz...@codeaurora.org Reporter: richard-l...@metafoo.co.uk CC: llvm-bugs@lists.llvm.org Testcase: #include #define DUMP(ptr) printf("%s %p\\n", __PRETTY_FUNCTION__, ptr) struct A { A() { DUMP(this); } A(const A&) { DUMP(this); } ~A() { DUMP(this); } }; void f(A a) { DUMP(&a); } int main() { f(A()); } Note that the address of the A object within f is not the address of an object for which a constructor or destructor is ever run. f is lowered to a zero-argument LLVM function. -- 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 33010] New: Crash in statepoint lowering after 297695
https://bugs.llvm.org/show_bug.cgi?id=33010 Bug ID: 33010 Summary: Crash in statepoint lowering after 297695 Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: san...@playingwithpointers.com CC: llvm-bugs@lists.llvm.org After 297695, the following code causes llc to crash: declare void @f() define i32 addrspace(1)* @test(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i1 %which) gc "statepoint-example" { entry: %tok = tail call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @f, i32 0, i32 0, i32 0, i32 0, i32 addrspace(1)* %a, i32 addrspace(1)* %b) %a.r = tail call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tok, i32 7, i32 7) ; (%a, %a) %b.r = tail call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tok, i32 8, i32 8) ; (%b, %b) %cond.v = select i1 %which, i8 addrspace(1)* %a.r, i8 addrspace(1)* %b.r %cond = bitcast i8 addrspace(1)* %cond.v to i32 addrspace(1)* ret i32 addrspace(1)* %cond } declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...) declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32, i32) -- 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 33011] New: MVN instruction "Upredictable" bit patterns incorrect
https://bugs.llvm.org/show_bug.cgi?id=33011 Bug ID: 33011 Summary: MVN instruction "Upredictable" bit patterns incorrect Product: libraries Version: 4.0 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Backend: ARM Assignee: unassignedb...@nondot.org Reporter: j...@galois.com CC: llvm-bugs@lists.llvm.org The MVN instructions in the TGEN data for ARM have all-zero Unpredictable pattens, but the ARM architecture manual specifies some bits in MVN instructions as expected to be zero but unpredictable otherwise. ARM manual version: ARMv7-A and ARMv7-R edition, ARM DDI 0406C.b (ID072512) Relevant sections: A8.8.116, A8.8.117 Instruction variants affected in LLVM ISA definition for ARM: MVNsr, MVNi, MVNr. For all of these variants, the ARM ARM specifies that bit positions [19:16] should be zero and unpredictable otherwise. All variants in LLVM 4.0 declare these to have no unpredictable bits. -- 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 33012] New: Suggested fix (static_cast) missing qualifier
https://bugs.llvm.org/show_bug.cgi?id=33012 Bug ID: 33012 Summary: Suggested fix (static_cast) missing qualifier Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: C++11 Assignee: unassignedclangb...@nondot.org Reporter: rhain...@binghamton.edu CC: dgre...@apple.com, llvm-bugs@lists.llvm.org In suggesting a static_cast to solve narrowing, clangs suggestion does not print the fully qualified name. For example this file (ex.cpp) namespace holds_alias { using MyInt = unsigned int; }; struct TakesAlias { TakesAlias(holds_alias::MyInt) { } }; TakesAlias t{-1}; The final line errors on narrowing as expected, but the suggestion note says: ex.cpp:9:14: note: insert an explicit cast to silence this issue TakesAlias t{-1}; ^~ static_cast( ) When in fact, what is needed is static_cast -- 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 33013] New: [x86] default codegen should be more branchy
https://bugs.llvm.org/show_bug.cgi?id=33013 Bug ID: 33013 Summary: [x86] default codegen should be more branchy Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: spatel+l...@rotateright.com CC: llvm-bugs@lists.llvm.org The default x86 target is something like an Intel big core (ie, it's good at absorbing the cost of correctly predicted branches, good at predicting those branches, and good at speculating execution past those branches). Therefore, we shouldn't favor cmov codegen for IR select as much as we currently do. Example: int foo(float x) { if (x < 42.0f) return x; return 12; } define i32 @foo(float %x) { %cmp = fcmp olt float %x, 4.20e+01 %conv = fptosi float %x to i32 %ret = select i1 %cmp, i32 %conv, i32 12 ret i32 %ret } $ clang -O2 cmovfp.c -S -o - movssLCPI0_0(%rip), %xmm1## xmm1 = mem[0],zero,zero,zero ucomiss%xmm0, %xmm1 cvttss2si%xmm0, %ecx movl$12, %eax cmoval%ecx, %eax retq Note that gcc and icc will use compare and branch on this example. -- 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 33014] New: clang crashes with "-mllvm -enable-newgvn": lots of "singleReachablePHIPath" in the stack trace
https://bugs.llvm.org/show_bug.cgi?id=33014 Bug ID: 33014 Summary: clang crashes with "-mllvm -enable-newgvn": lots of "singleReachablePHIPath" in the stack trace Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: LLVM Codegen Assignee: unassignedclangb...@nondot.org Reporter: helloqi...@gmail.com CC: llvm-bugs@lists.llvm.org The following code crashes the current trunk version at "-O3" and above with "-mllvm -enable-newgvn". $ clang-trunk -v clang version 5.0.0 (trunk 302779) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.3 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.1.1 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/3.4.6 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.8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.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.1.1 Found candidate GCC installation: /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0 Found candidate GCC installation: /usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0 Selected GCC installation: /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 $ clang-trunk -mllvm -enable-newgvn abc.c -O3 abc.c:19:12: warning: incompatible pointer to integer conversion initializing 'char' with an expression of type 'long *' [-Wint-conversion] char g = f = &c; ^ ~~ #0 0x01c876b4 PrintStackTraceSignalHandler(void*) (/home/absozero/trunk/root-clang/bin/clang-5.0+0x1c876b4) #1 0x01c879e6 SignalHandler(int) (/home/absozero/trunk/root-clang/bin/clang-5.0+0x1c879e6) #2 0x7fa130e28330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330) #3 0x01b86201 bool llvm::DenseMapBase, llvm::detail::DenseSetPair >, llvm::BasicBlockEdge, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo, llvm::detail::DenseSetPair >::LookupBucketFor(llvm::BasicBlockEdge const&, llvm:\ :detail::DenseSetPair const*&) const (/home/absozero/trunk/root-clang/bin/clang-5.0+0x1b86201) #4 0x01b941d3 llvm::filter_iterator::findNextValid() (/home/absozero/trunk/root-clang/bin/clang-5.0+0x1b941d3) #5 0x01b93c85 (anonymous namespace)::NewGVN::singleReachablePHIPath(llvm::MemoryAccess const*, llvm::MemoryAccess const*) const (/hom\ e/absozero/trunk/root-clang/bin/clang-5.0+0x1b93c85) #6 0x01b93de8 (anonymous namespace)::NewGVN::singleReachablePHIPath(llvm::MemoryAccess const*, llvm::MemoryAccess const*) const (/hom\ e/absozero/trunk/root-clang/bin/clang-5.0+0x1b93de8) #253 0x01b93de8 (anonymous namespace)::NewGVN::singleReachablePHIPath(llvm::MemoryAccess const*, llvm::MemoryAccess const*) const (/h\ ome/absozero/trunk/root-clang/bin/clang-5.0+0x1b93de8) #254 0x01b93de8 (anonymous namespace)::NewGVN::singleReachablePHIPath(llvm::MemoryAccess const*, llvm::MemoryAccess const*) const (/h\ ome/absozero/trunk/root-clang/bin/clang-5.0+0x1b93de8) #255 0x01b93de8 (anonymous namespace)::NewGVN::singleReachablePHIPath(llvm::MemoryAccess const*, llvm::MemoryAccess const*) const (/h\ ome/absozero/trunk/root-clang/bin/clang-5.0+0x1b93de8) Stack dump: 0. Program arguments: /home/absozero/trunk/root-clang/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-\ file-name abc.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-ar\ ray -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -resource-dir /home/absozero/trunk/root-clang/lib/cl\ ang/5.0.0 -internal-isystem /usr/local/include -internal-isystem /home/absozero/trunk/root-clang/lib/clang/5.0.0/include -internal-externc-is\ ystem /usr/include/x86_64-
[llvm-bugs] [Bug 33015] New: Improve error message for reading an object outside its lifetime
https://bugs.llvm.org/show_bug.cgi?id=33015 Bug ID: 33015 Summary: Improve error message for reading an object outside its lifetime Product: clang Version: 4.0 Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: da...@doublewise.net CC: llvm-bugs@lists.llvm.org The current error message is: note: read of object outside its lifetime is not allowed in a constant expression It would be more helpful if, instead of just telling me it is outside of the lifetime, it told me whether it was before its lifetime has begun or after it has ended. I was very confused when I got this as I was obviously not reading an object after its lifetime had ended, but then I realized I had misused a cast to derived in a constructor and I was actually using it before it was constructed. -- 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 33016] New: compiler crash clang 3.9.1 mac osx
https://bugs.llvm.org/show_bug.cgi?id=33016 Bug ID: 33016 Summary: compiler crash clang 3.9.1 mac osx Product: clang Version: 3.9 Hardware: Macintosh OS: MacOS X Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: gwr...@njit.edu CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Stack dump: 0. Program arguments: /opt/local/libexec/llvm-3.9/bin/clang -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name ubint.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 274.1 -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -coverage-file /Users/gerardryan/Desktop/palisade-student-edition/palisade-student-edition/src/core/bin/lib/math/exp_int/ubint.o -resource-dir /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1 -I src/core/lib -I src/pke/lib -I src/trapdoor/lib -I test -I /opt/local/include/libomp -stdlib=libc++ -O3 -Wall -w -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/gerardryan/Desktop/palisade-student-edition/palisade-student-edition -ferror-limit 19 -fmessage-length 134 -I/opt/local/include/libomp -fopenmp -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o src/core/bin/lib/math/exp_int/ubint.o -x c++ src/core/lib/math/exp_int/ubint.cpp 1. src/core/lib/math/exp_int/ubint.cpp:2916:40: current parser token ';' 2. src/core/lib/math/exp_int/ubint.cpp:230:73: instantiating function definition 'exp_int::ubint::(anonymous class)::operator()' 3. src/core/lib/math/exp_int/ubint.cpp:230:73: LLVM IR generation of declaration 'exp_int::ubint::(anonymous class)::operator()' 4. src/core/lib/math/exp_int/ubint.cpp:230:73: Generating code for declaration 'exp_int::ubint::(anonymous class)::operator()' clang: error: unable to execute command: Segmentation fault: 11 clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.9.1 (tags/RELEASE_391/final) Target: x86_64-apple-darwin16.5.0 Thread model: posix InstalledDir: /opt/local/libexec/llvm-3.9/bin clang: 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: note: diagnostic msg: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /var/folders/y0/_f_nr_dn5pxcxwzlyw36fz2rgn/T/ubint-061c59.cpp clang: note: diagnostic msg: /var/folders/y0/_f_nr_dn5pxcxwzlyw36fz2rgn/T/ubint-061c59.sh clang: 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 32721] IfConversion creating bad CFG when merging triangle
https://bugs.llvm.org/show_bug.cgi?id=32721 Mikael Holmén changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mikael Holmén --- Fixed in r302876. -- 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