[llvm-bugs] [Bug 33243] New: R_386_GOTPC relocations unnecessarily turned into textrels
https://bugs.llvm.org/show_bug.cgi?id=33243 Bug ID: 33243 Summary: R_386_GOTPC relocations unnecessarily turned into textrels Product: lld Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: ELF Assignee: unassignedb...@nondot.org Reporter: h...@shiz.me CC: llvm-bugs@lists.llvm.org I've encountered an issue when attempting to cross-compile Go 1.8.1 to i586 using clang and LLD 4.0.0: it will refuse to process a bunch of R_386_GOTPC unless -z notext (patch backported from SVN) is specified, at which point it will create .text relocations. However, BFD LD and Gold do not seem to have this requirement, and no textrels are created: c581a024c2d7:/aports# # BFD ld c581a024c2d7:/aports# ld --version GNU ld (GNU Binutils) 2.28 Copyright (C) 2017 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. c581a024c2d7:/aports# clang -target i586-alpine-linux-musl -resource-dir ~/sysroot-x86/usr/lib/clang/4.0.0 --rtlib=compiler-rt --sysroot ~/sysroot-x86 -m32 -gdwarf-2 -Wl,-z,relro -pie -rdynamic /tmp/nice/go-link-597453838/go.o -o a.out c581a024c2d7:/aports# scanelf --textrel a.out TYPE TEXTREL FILE ET_DYN-a.out c581a024c2d7:/aports# # gold c581a024c2d7:/aports# ld.gold --version GNU gold (GNU Binutils 2.28) 1.14 Copyright (C) 2017 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. c581a024c2d7:/aports# clang -fuse-ld=gold -target i586-alpine-linux-musl -resource-dir ~/sysroot-x86/usr/lib/clang/4.0.0 --rtlib=compiler-rt --sysroot ~/sysroot-x86 -m32 -gdwarf-2 -Wl,-z,relro -pie -rdynamic /tmp/nice/go-link-597453838/go.o -o a.out c581a024c2d7:/aports# scanelf --textrel a.out TYPE TEXTREL FILE ET_DYN-a.out c581a024c2d7:/aports# # lld c581a024c2d7:/aports# ld.lld --version LLD 4.0.0 (compatible with GNU linkers) c581a024c2d7:/aports# clang -fuse-ld=lld -target i586-alpine-linux-musl -resource-dir ~/sysroot-x86/usr/lib/clang/4.0.0 --rtlib=compiler-rt --sysroot ~/sysroot-x86 -m32 -gdwarf-2 -Wl,-z,relro -pie -rdynamic /tmp/nice/go-link-597453838/go.o -o a.out /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:47: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:50: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:53: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:56: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:59: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:62: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:96: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:106: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:118: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:130: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:135: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:140: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o /usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:158: can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-5
[llvm-bugs] [Bug 33244] New: Vector literal construction from smaller vectors does not work as documented
https://bugs.llvm.org/show_bug.cgi?id=33244 Bug ID: 33244 Summary: Vector literal construction from smaller vectors does not work as documented Product: clang Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: jochen.wilhe...@tomtom.com CC: llvm-bugs@lists.llvm.org The following minimal example does not work as documented: typedef float float2 __attribute__((ext_vector_type(2))); typedef float float4 __attribute__((ext_vector_type(4))); int main() { float4 vf = (float4)((float2)(1.0f, 2.0f), (float2)(3.0f, 4.0f)); } The documentation says it should work: https://clang.llvm.org/docs/LanguageExtensions.html#vector-literals It was tested with Clang HEAD 5.0.0 in https://wandbox.org/ (also Clang 3.8 on Ubuntu) It would be nice if this could be fixed as I expect it works when in OpenCL mode and therefore should be easy to 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 32504] segfault linking FreeBSD/mips64 base system
https://bugs.llvm.org/show_bug.cgi?id=32504 Simon Atanasyan changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #2 from Simon Atanasyan --- Fixed by r304260. http://llvm.org/viewvc/llvm-project?rev=304260&view=rev Now LLD can create R_MISP32/R_MIPS_64 relocations against .eh_frame sections but additionally we have to provide -z notext flag to the linker. Fixing the last issue is a separate task. -- 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 23214] [META] Using LLD as FreeBSD's system linker
https://bugs.llvm.org/show_bug.cgi?id=23214 Bug 23214 depends on bug 32504, which changed state. Bug 32504 Summary: segfault linking FreeBSD/mips64 base system https://bugs.llvm.org/show_bug.cgi?id=32504 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33245] New: [ThinLTO] In LTO personality function missing.
https://bugs.llvm.org/show_bug.cgi?id=33245 Bug ID: 33245 Summary: [ThinLTO] In LTO personality function missing. Product: lld Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: ELF Assignee: unassignedb...@nondot.org Reporter: wallbra...@gmail.com CC: llvm-bugs@lists.llvm.org Created attachment 18550 --> https://bugs.llvm.org/attachment.cgi?id=18550&action=edit Test case, just run run.sh to demonstrate. As it says in the subject, the linker is not able to find the personality function when linking a program. What I am doing here is running ThinLTO with the personality function inside of the LTO bitcode files, not externally. If I move the personality function to a o binary it fixes the problem. The same bug happens if you remove the -fuse-ld=lld. Running the attached testcase I get the error below. $ ./run.sh /home/jakob/bin/ld.lld: error: undefined symbol: vrt_eh_personality_v0 >>> referenced by main >>> lto.tmp:(.eh_frame+0x13) clang: error: linker command failed with exit code 1 (use -v to see invocation) Cheers, Jakob. -- 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 32653] vec_xxsldi and vec_xxpermdi missing from altivec.h
https://bugs.llvm.org/show_bug.cgi?id=32653 jt...@ca.ibm.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33174] Merge r298177 into the 4.0 branch : [X86] Add NumRegisterParameters Module Flag.
https://bugs.llvm.org/show_bug.cgi?id=33174 Tom Stellard changed: What|Removed |Added Resolution|--- |FIXED Status|REOPENED|RESOLVED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 32061] [meta] 4.0.1 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=32061 Bug 32061 depends on bug 33174, which changed state. Bug 33174 Summary: Merge r298177 into the 4.0 branch : [X86] Add NumRegisterParameters Module Flag. https://bugs.llvm.org/show_bug.cgi?id=33174 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 28601] [mc] New syntax for ds_swizzle_b32 offset
https://bugs.llvm.org/show_bug.cgi?id=28601 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #14 from Dmitry --- Fixed by commit r304309 -- 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 28601] [mc] New syntax for ds_swizzle_b32 offset
https://bugs.llvm.org/show_bug.cgi?id=28601 Artem Tamazov changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- Assignee|dpreobrazhen...@luxoft.com |i.am.permi...@gmail.com --- Comment #15 from Artem Tamazov --- (In reply to Dmitry from comment #14) > Fixed by commit r304309 Reopened as gfx8+ swizzle modes not implemented yet. Ilya, please provide us with description of fft and rotate modes and proposal for the syntax. Then, assign to Dmitry. -- 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 33242] Address Sanitizer (ASAN) flags incorrect heap-use-after-free on PowerPC
https://bugs.llvm.org/show_bug.cgi?id=33242 Kostya Serebryany changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #3 from Kostya Serebryany --- > > I assume the above commit contains the changes in question. If not, let me > know. Yes. The change is http://llvm.org/viewvc/llvm-project?rev=303869&view=rev Closing the bug now, but please re-open if it still reproduces. -- 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 33246] New: wrong code at -O0 only in 32-bit mode on x86_64-linux-gnu
https://bugs.llvm.org/show_bug.cgi?id=33246 Bug ID: 33246 Summary: wrong code at -O0 only in 32-bit mode on x86_64-linux-gnu Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: chengnian...@gmail.com CC: llvm-bugs@lists.llvm.org $ clang-trunk -v clang version 5.0.0 (trunk 304216) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5 Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.3.0 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.0 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.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 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 $ clang-trunk -m32 -O0 small.c ; ./a.out 0 0 0 0 0 0 0 5 $ clang-trunk -m32 -O1 small.c ; ./a.out 0 0 0 0 0 0 0 0 $ cat small.c int printf(const char *, ...); int a[6]; int crc32_context, crc32_gentab_i, j, i, k; char ga[8][30]; int main() { for (; crc32_gentab_i < 6; crc32_gentab_i++) a[0] = crc32_gentab_i; for (; i < 8; i++) { j = 0; for (; j < 5; j++) { k = 0; for (; k < 6; k++) { long long val = ga[i][j * 5]; crc32_context = a[crc32_context ^ val]; } } printf("%X\n", crc32_context); } 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 33247] New: Enable extractelement to alias with vector spills
https://bugs.llvm.org/show_bug.cgi?id=33247 Bug ID: 33247 Summary: Enable extractelement to alias with vector spills Product: new-bugs Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: llvm-...@redking.me.uk CC: andrea.dibia...@gmail.com, dav...@freebsd.org, fil...@gmail.com, llvm-bugs@lists.llvm.org, spatel+l...@rotateright.com define i32 @popcnt_i128(<4 x i32> %a0) { %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() %2 = extractelement <4 x i32> %a0, i32 0 %3 = extractelement <4 x i32> %a0, i32 1 %4 = extractelement <4 x i32> %a0, i32 2 %5 = extractelement <4 x i32> %a0, i32 3 %6 = call i32 @llvm.ctpop.i32(i32 %2) %7 = call i32 @llvm.ctpop.i32(i32 %3) %8 = call i32 @llvm.ctpop.i32(i32 %4) %9 = call i32 @llvm.ctpop.i32(i32 %5) %10 = add i32 %6, %7 %11 = add i32 %8, %9 %12 = add i32 %10, %11 ret i32 %12 } declare i32 @llvm.ctpop.i32(i32) nounwind readnone llc -mtriple=x86_64-unknown -mcpu=btver2 popcnt_i128: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx vmovd %xmm0, -4(%rsp) # 4-byte Folded Spill vpextrd $1, %xmm0, -8(%rsp) # 4-byte Folded Spill vpextrd $2, %xmm0, -12(%rsp)# 4-byte Folded Spill vpextrd $3, %xmm0, -16(%rsp)# 4-byte Folded Spill #APP nop #NO_APP popcntl -4(%rsp), %ecx # 4-byte Folded Reload popcntl -8(%rsp), %edx # 4-byte Folded Reload popcntl -12(%rsp), %esi # 4-byte Folded Reload popcntl -16(%rsp), %eax # 4-byte Folded Reload addl%ecx, %edx addl%esi, %eax addl%edx, %eax popq%rbx popq%r12 popq%r13 popq%r14 popq%r15 popq%rbp retq Each extractelement is being spilled to stack separately, requiring 4 scalar stores. Ideally the vector would be spilled whole and the reloads done as scalars: popcnt_i128_IDEAL: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx vmovdqa %xmm0, -16(%rsp)# 16-byte Folded Spill #APP nop #NO_APP popcntl -4(%rsp), %ecx # 4-byte Folded Reload popcntl -8(%rsp), %edx # 4-byte Folded Reload popcntl -12(%rsp), %esi # 4-byte Folded Reload popcntl -16(%rsp), %eax # 4-byte Folded Reload addl%ecx, %edx addl%esi, %eax addl%edx, %eax popq%rbx popq%r12 popq%r13 popq%r14 popq%r15 popq%rbp 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33237] clang-cl: Ignore or implement /diagnostics:caret, /Zc:ternary, and (on x64) /Gr and /Gz
https://bugs.llvm.org/show_bug.cgi?id=33237 Reid Kleckner changed: What|Removed |Added CC||r...@google.com Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #1 from Reid Kleckner --- Thanks for the report, these should all be implemented after r304316. Please reopen if they don't work properly. :) -- 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 33172] DAGCombiner crashes with asan build after r303560
https://bugs.llvm.org/show_bug.cgi?id=33172 Nirav Dave changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Nirav Dave --- Fixed in r304299. -- 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 33205] [clang-cl] clang-cl does not honor -Xclang -nobuiltininc
https://bugs.llvm.org/show_bug.cgi?id=33205 Reid Kleckner changed: What|Removed |Added Resolution|--- |FIXED CC||r...@google.com Status|NEW |RESOLVED --- Comment #1 from Reid Kleckner --- You are using -Xclang, so it bypasses any handling of -nobuiltininc in the driver, so what you get is expected behavior: -nobuiltininc is passed along to the -cc1 invocation along with builtin include directories I went ahead and exposed -nobuiltininc and -nostdinc in r304345. -- 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 33248] New: -fsanitize=fuzzer fails to find libLLVMFuzzer.a
https://bugs.llvm.org/show_bug.cgi?id=33248 Bug ID: 33248 Summary: -fsanitize=fuzzer fails to find libLLVMFuzzer.a Product: Packaging Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: deb packages Assignee: unassignedb...@nondot.org Reporter: gja...@googlemail.com CC: llvm-bugs@lists.llvm.org Hello, on Ubuntu Xenial (amd64), after installing all packages of the development branch (1:5.0~svn304261-1~exp1) the following fails: $ touch mytarget.c $ clang-5.0 -fsanitize=fuzzer mytarget.c /usr/bin/ld: cannot find /usr/lib/libLLVMFuzzer.a: No such file or directory The -fsanitize=fuzzer argument is documented here: http://llvm.org/docs/LibFuzzer.html#getting-started Thanks, Gregor -- 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 33249] New: LLVM generates far less than ideal code for cold functions (when optimizing for size)
https://bugs.llvm.org/show_bug.cgi?id=33249 Bug ID: 33249 Summary: LLVM generates far less than ideal code for cold functions (when optimizing for size) Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: dav...@freebsd.org CC: davi...@google.com, fil...@gmail.com, llvm-bugs@lists.llvm.org, llvm-...@redking.me.uk, rafael.espind...@gmail.com, simon.f.whitta...@gmail.com, w...@google.com, xinlian...@gmail.com https://godbolt.org/g/kgGJxw This function is cold, we should optimize for size (also at -O3), as GCC does: winky(int): # @winky(int) mov eax, 1 movdxmm2, eax movdxmm0, edi pshufd xmm1, xmm0, 0 # xmm1 = xmm0[0,0,0,0] punpckldq xmm0, xmm2 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] pshufd xmm2, xmm2, 80 # xmm2 = xmm2[0,0,1,1] punpckldq xmm0, xmm2 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] mov eax, 36 pshufd xmm2, xmm1, 245 # xmm2 = xmm1[1,1,3,3] .LBB1_1:# =>This Inner Loop Header: Depth=1 pshufd xmm3, xmm0, 245 # xmm3 = xmm0[1,1,3,3] pmuludq xmm0, xmm1 pshufd xmm0, xmm0, 232 # xmm0 = xmm0[0,2,2,3] pmuludq xmm3, xmm2 pshufd xmm3, xmm3, 232 # xmm3 = xmm3[0,2,2,3] punpckldq xmm0, xmm3 # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1] add eax, -4 jne .LBB1_1 pshufd xmm1, xmm0, 78 # xmm1 = xmm0[2,3,0,1] pshufd xmm2, xmm0, 245 # xmm2 = xmm0[1,1,3,3] pmuludq xmm0, xmm1 pshufd xmm0, xmm0, 232 # xmm0 = xmm0[0,2,2,3] pshufd xmm1, xmm1, 245 # xmm1 = xmm1[1,1,3,3] pmuludq xmm1, xmm2 pshufd xmm1, xmm1, 232 # xmm1 = xmm1[0,2,2,3] punpckldq xmm0, xmm1 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] pshufd xmm1, xmm0, 229 # xmm1 = xmm0[1,1,2,3] pmuludq xmm1, xmm0 pshufd xmm1, xmm1, 232 # xmm1 = xmm1[0,2,2,3] pshufd xmm0, xmm0, 245 # xmm0 = xmm0[1,1,3,3] pmuludq xmm0, xmm0 pshufd xmm0, xmm0, 232 # xmm0 = xmm0[0,2,2,3] punpckldq xmm1, xmm0 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] movdeax, xmm1 ret vs winky(int): mov eax, edi mov edx, 36 .L6: imuleax, edi dec edx jne .L6 ret -- 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 33250] New: Issue with utf8 string display in the ncurses-GUI mode on a Beaglebone Black (ARMv6)
https://bugs.llvm.org/show_bug.cgi?id=33250 Bug ID: 33250 Summary: Issue with utf8 string display in the ncurses-GUI mode on a Beaglebone Black (ARMv6) Product: lldb Version: unspecified Hardware: Other OS: FreeBSD Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-...@lists.llvm.org Reporter: r...@obsigna.com CC: llvm-bugs@lists.llvm.org I built (lldb + clang/lld) from the svn trunk of LLVM 5.0.0 on my Beaglebone Black running the latest snapshot (May 26th) of FreeBSD 12.0-CURRENT. # lldb --version lldb version 5.0.0 (http://llvm.org/svn/llvm-project/lldb/trunk revision 304078) clang revision 304078 llvm revision 304078 However, the present issue can be found in lldb at least since 3.8. First of all, my system's locale is: LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_ALL= $echo $TERM xterm-256color Now, please consider the following tiny ncurses test program 'cursutf8.c', which prints out the traditional German pangram for testing the special characters 'ä', 'ö', 'ü', 'ß', each of which consists of two bytes when encoded in UTF8: #include #include #include #include int main(int argc, char *argv[]) { setlocale(LC_CTYPE, ""); WINDOW *window = initscr(); if (window) { mvaddstr(3, 3, "Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich."); refresh(); sleep(3); delwin(window); endwin(); refresh(); return 0; } else return 1; } I compile this using: $clang -g -O0 cursutf8.c -lncursesw -o cursutf8 When I run it, it correctly prints out: Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich. Then I start this with lldb: $lldb -- cursutf8 (lldb) breakpoint set -f cursutf8.c -l 13 (lldb) run Process 13886 stopped * thread #1, name = 'cursutf8', stop reason = breakpoint 1.1 frame #0: 0x8a08 cursutf8`main(argc=1, argv=0xbfbfec74) at cursutf8.c:13 10 WINDOW *window = initscr(); 11 if (window) 12 { -> 13 mvaddstr(3, 3, "Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich."); 14 refresh(); 15 sleep(3); 16 So far this is OK as well. The issue shows up, when I enter into the GUI mode: (lldb) gui │ 10 │WINDOW *window = initscr(); │ 11 │if (window) │ 12 │{ │ 13 │◆ mvaddstr(3, 3, "ZwM-CM-6lf BoxkM-CM-$mpfer jagen Viktor quer M-CM-___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33251] New: Don't include Windows.h within the headers
https://bugs.llvm.org/show_bug.cgi?id=33251 Bug ID: 33251 Summary: Don't include Windows.h within the headers Product: libc++ Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: e...@efcs.ca CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com There are a ton of bugs caused by libc++ including windows.h in <__threading_support>. In the long run we need to remove any dependancies on Windows.h inside libc++ headers. This will require re-writing large parts of <__threading_support> to use dummy types in place of the Windows types, and then casting them to the actual type and calling the windows API's inside the library. For example SRWLOCK. -- 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 33252] New: 5.0.0-svn300007-1~exp1 segfault llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator
https://bugs.llvm.org/show_bug.cgi?id=33252 Bug ID: 33252 Summary: 5.0.0-svn37-1~exp1 segfault llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineIn strBundleIterator&) Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: danie...@au1.ibm.com CC: llvm-bugs@lists.llvm.org Created attachment 18553 --> https://bugs.llvm.org/attachment.cgi?id=18553&action=edit clock_cache-aeb995.sh While compiling rocksdb master branch from github facebook with clang-5.0 apt packages: + clang-5.0 --version clang version 5.0.0-svn37-1~exp1 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin + clang++-5.0 --version clang version 5.0.0-svn37-1~exp1 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin make -j44 --output-sync=target V=1 'OPT=-DSNAPPY=1 -DLZ4=1 -DZLIB=1 -DJEMALLOC=1 -DZSTD=1 -DNUMA=1' shared_lib clang++-5.0 -Wl,--no-as-needed -shared -Wl,-soname -Wl,librocksdb.so.5.3 -m64 -O3 -g -mtune=native -I /opt/ibm/java/include/ -std=c++11 -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -I. -I./include -std=c++11 -m64 -O3 -g -mtune=native -I /opt/ibm/java/include/ -std=c++11 -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -m64 -O3 -g -mtune=native -I /opt/ibm/java/include/ -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -DLZ4 -DZSTD -DNUMA -DTBB -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -Wshorten-64-to-32 -march=native -DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE -isystem ./third-party/gtest-1.7.0/fused-src -DSNAPPY=1 -DLZ4=1 -DZLIB=1 -DJEMALLOC=1 -DZSTD=1 -DNUMA=1 -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -fPIC cache/clock_cache.cc cache/lru_cache.cc cache/sharded_cache.cc db/builder.cc db/c.cc db/column_family.cc db/compacted_db_impl.cc db/compaction.cc db/compaction_iterator.cc db/compaction_job.cc db/compaction_picker.cc db/compaction_picker_universal.cc db/convenience.cc db/db_filesnapshot.cc db/db_impl.cc db/db_impl_write.cc db/db_impl_compaction_flush.cc db/db_impl_files.cc db/db_impl_open.cc db/db_impl_debug.cc db/db_impl_experimental.cc db/db_impl_readonly.cc db/db_info_dumper.cc db/db_iter.cc db/dbformat.cc db/event_helpers.cc db/experimental.cc db/external_sst_file_ingestion_job.cc db/file_indexer.cc db/flush_job.cc db/flush_scheduler.cc db/forward_iterator.cc db/internal_stats.cc db/log_reader.cc db/log_writer.cc db/managed_iterator.cc db/memtable.cc db/memtable_list.cc db/merge_helper.cc db/merge_operator.cc db/range_del_aggregator.cc db/repair.cc db/snapshot_impl.cc db/table_cache.cc db/table_properties_collector.cc db/transaction_log_impl.cc db/version_builder.cc db/version_edit.cc db/version_set.cc db/wal_manager.cc db/write_batch.cc db/write_batch_base.cc db/write_controller.cc db/write_thread.cc env/env.cc env/env_chroot.cc env/env_hdfs.cc env/env_posix.cc env/io_posix.cc env/memenv.cc memtable/hash_cuckoo_rep.cc memtable/hash_linklist_rep.cc memtable/hash_skiplist_rep.cc memtable/memtable_allocator.cc memtable/skiplistrep.cc memtable/vectorrep.cc monitoring/histogram.cc monitoring/histogram_windowing.cc monitoring/instrumented_mutex.cc monitoring/iostats_context.cc monitoring/perf_context.cc monitoring/perf_level.cc monitoring/statistics.cc monitoring/thread_status_impl.cc monitoring/thread_status_updater.cc monitoring/thread_status_updater_debug.cc monitoring/thread_status_util.cc monitoring/thread_status_util_debug.cc options/cf_options.cc options/db_options.cc options/options.cc options/options_helper.cc options/options_parser.cc options/options_sanity_check.cc port/port_posix.cc port/stack_trace.cc table/adaptive_table_factory.cc table/block.cc table/block_based_filter_block.cc table/block_based_table_builder.cc table/block_based_table_factory.cc table/block_based_table_reader.cc table/block_builder.cc table/block_prefix_index.cc table/bloom_block.cc table/cuckoo_table_builder.cc table/cuckoo_table_factory.cc table/cuckoo_table_reader.cc table/flush_block_policy.cc table/format.cc table/full_filter_block.cc table/get_context.cc table/index_builder.cc table/iterator.cc table/merging_iterator.cc table/meta_blocks.cc table/partitioned_filter_block.cc table/persistent_cache_helper.cc table/plain_table_builder.cc table/plain_table_factory.cc table/plain_table_index.cc table/plain_table_key_coding.cc table/plain_table_reader.cc table/sst_file_writer.cc table/table_properties.cc table/two_level_iterator.cc tools/dump/db_dump_tool.cc util/arena.cc util/auto_roll_logger.cc util/bloom.cc util/build_version.cc util/coding.cc util/compaction_job_stats_impl.cc util/comparator.cc util/concurrent_arena.cc util/
[llvm-bugs] [Bug 33253] New: missed interprocedural propagation opportunity
https://bugs.llvm.org/show_bug.cgi?id=33253 Bug ID: 33253 Summary: missed interprocedural propagation opportunity Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: dav...@freebsd.org CC: dber...@dberlin.org, efrie...@codeaurora.org, fil...@gmail.com, llvm-bugs@lists.llvm.org, llvm-...@redking.me.uk, simon.f.whitta...@gmail.com In the following testcase: __attribute__((noinline)) static int f(int x) { if (x > 300) return 1; else return 2; } int main(void) { int a = f(1); int b = f(47); int c = f(219); return a + b + c; } we should be able to propagate the fact that x in f is never greater than 300, so the predicate in f can be removed, as the function is not visible outside of the TU. This is a simplified testcase, but the optimization can be more important at LTO time. I don't think the "paper algorithm" that we have in SCCP is able to handle this case. -- 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 33254] New: clang-format vs plugin: erase SkipLoading when removing/installing
https://bugs.llvm.org/show_bug.cgi?id=33254 Bug ID: 33254 Summary: clang-format vs plugin: erase SkipLoading when removing/installing Product: new-bugs Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: yaron.ke...@gmail.com CC: djas...@google.com, llvm-bugs@lists.llvm.org If for any reason clang-format fails loading, devenv will helpfully suggest to disable it upon loading. From this point clang-format plugin not work again even after removing and installing since the SkipLoading key is set: [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Packages\{C5286038-25D3-4F65-83A8-51FA2DF4A146}] "SkipLoading"=dword:0001 SkipLoading should be deleted as part of removing clang-format plugin or installing it. see also https://msdn.microsoft.com/en-us/library/ms241276.aspx but this switch will potentially enable other skipped pacakages. -- 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