[llvm-bugs] [Bug 49204] New: miss optimization is actually slowing code from unoptmized state...
https://bugs.llvm.org/show_bug.cgi?id=49204 Bug ID: 49204 Summary: miss optimization is actually slowing code from unoptmized state... Product: tools Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: llc Assignee: unassignedb...@nondot.org Reporter: gordonbg...@gmail.com CC: llvm-bugs@lists.llvm.org Created attachment 24537 --> https://bugs.llvm.org/attachment.cgi?id=24537&action=edit The output of `opt` that `llc` does not optimize correctly... This is not a bug preventing use, but rather a miss-optimization that increases run-time on the actual x86_64 CPU by probably about 33% up to 50%. Note: The following was found on a PC with x86_64 architecture, OS-independent, but could easily apply to any architecture on any machine with any OS... The use case is applying extreme loop unrolling to optimize an extremely tight loop for an implementation of the Sieve of Eratosthenes. Without getting into too many irrelevant details, one case of the unrolled loop is the following snippet, with 31 other cases where the only differences are the initialization of the pointer and integers and the order and sequence of the constants that are or'ed across an array (the Sieve algorithm). The following code can run on a modern x86-64 CPU in as little as an average of just over one CPU clock cycle per composite number cull (the or operation): ``` // pntr, inc, r1, r2, r3, r4, r5, r6, and r7 are initialized previously // where ptr is a pointer to byte, rest are just integers... while pntr < pntrlmt { or 1 with *ptnt or 2 with *pntr + r1 or 4 with *pntr + r2 or 8 with *pntr + r3 or 16 with *pntr + r4 or 32 with *pntr + r5 or 64 with *pntr + r6 or 128 with *pntr + r7 pntr += inc } ``` The actual code is generated from GHC Haskell using TemplateHaskell to autogenerate all the 32 code cases of a variety of versions of GHC using a variety of versions of LLVM by using the "-fllvm" GHC compiler flag to use the LLVM back-end, but that would seem to be irrelevant to the problem. The following is a snippet from the input file (as attached) into the llc compiler in readable llvm form (an ".ll" file) (call it "test.ll" as generated by the `opt` optimizer with given arguments, which is as expected (the optmization level used doesn't seem to much matter as long as it is higher than zero): ``` opt -O2 -enable-tbaa -tbaa '-relocation-model=pic' -S TestProgramGen.ll -o Test.ll ``` ``` cA2a: ; preds = %czYi, %cA2a %lsyE8.052 = phi i64 [ %lnA69, %cA2a ], [ %lnA4y, %czYi ] %lnA4F = inttoptr i64 %lsyE8.052 to i8* %lnA4G = load i8, i8* %lnA4F, align 1, !tbaa !6 %0 = or i8 %lnA4G, 1 store i8 %0, i8* %lnA4F, align 1, !tbaa !6 %lnA4N = add i64 %lsyE8.052, %lnA3t %lnA4R = inttoptr i64 %lnA4N to i8* %lnA4S = load i8, i8* %lnA4R, align 1, !tbaa !6 %1 = or i8 %lnA4S, 2 store i8 %1, i8* %lnA4R, align 1, !tbaa !6 %lnA4Z = add i64 %lsyE8.052, %lnA3D %lnA53 = inttoptr i64 %lnA4Z to i8* %lnA54 = load i8, i8* %lnA53, align 1, !tbaa !6 %2 = or i8 %lnA54, 4 store i8 %2, i8* %lnA53, align 1, !tbaa !6 %lnA5b = add i64 %lsyE8.052, %lnA3N %lnA5f = inttoptr i64 %lnA5b to i8* %lnA5g = load i8, i8* %lnA5f, align 1, !tbaa !6 %3 = or i8 %lnA5g, 8 store i8 %3, i8* %lnA5f, align 1, !tbaa !6 %lnA5n = add i64 %lsyE8.052, %lnA3X %lnA5r = inttoptr i64 %lnA5n to i8* %lnA5s = load i8, i8* %lnA5r, align 1, !tbaa !6 %4 = or i8 %lnA5s, 16 store i8 %4, i8* %lnA5r, align 1, !tbaa !6 %lnA5z = add i64 %lsyE8.052, %lnA47 %lnA5D = inttoptr i64 %lnA5z to i8* %lnA5E = load i8, i8* %lnA5D, align 1, !tbaa !6 %5 = or i8 %lnA5E, 32 store i8 %5, i8* %lnA5D, align 1, !tbaa !6 %lnA5L = add i64 %lsyE8.052, %lnA4h %lnA5P = inttoptr i64 %lnA5L to i8* %lnA5Q = load i8, i8* %lnA5P, align 1, !tbaa !6 %6 = or i8 %lnA5Q, 64 store i8 %6, i8* %lnA5P, align 1, !tbaa !6 %lnA5X = add i64 %lsyE8.052, %lnA4r %lnA61 = inttoptr i64 %lnA5X to i8* %lnA62 = load i8, i8* %lnA61, align 1, !tbaa !6 %7 = or i8 %lnA62, -128 store i8 %7, i8* %lnA61, align 1, !tbaa !6 %lnA69 = add i64 %lsyE8.052, %R2_Arg %lnA4B.not = icmp ult i64 %lnA69, %lnA4w br i1 %lnA4B.not, label %cA2a, label %cA2b cA2b: ; preds = %cA2a, %czYi ``` The compiler `llc` is run with the following options, but it doesn't seem to matter what the optimization level is as long as it is greater than zero: ``` llc -O2 -enable-tbaa '-relocation-model=pic' '-mcpu=x86-64' '-mattr=+sse2,+sse' test.bc -o test.s ``` The following is the appropriate equivalent snippet from the output assembly file in AT&T format (as per "test.s"): ``` .LBB10_2: # %czzW # =>This Inner Loop Header: Depth=1
[llvm-bugs] [Bug 48827] older versions of wasm-ld crashes when when given object files built with llvm trunk
https://bugs.llvm.org/show_bug.cgi?id=48827 Andy Wingo changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #6 from Andy Wingo --- Closing as fixed due to reverts. -- 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 49205] New: compile-time explosion with assumes at -O1 to -Os
https://bugs.llvm.org/show_bug.cgi?id=49205 Bug ID: 49205 Summary: compile-time explosion with assumes at -O1 to -Os Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: haoxi...@gmail.com CC: llvm-bugs@lists.llvm.org Hi, all. This code, s.c, is a valid program but makes Clang hung on at compile time at -O1 to -Os. $cat s.c int a; void b() { int *c = &a; int *d = &a; int **e = &d; for (*c = 7; c <= 2; *c += 1) { int **f = d; *c = 0; **e /= f ? (c ? 10 : **f) % (*c &= 6) : 0; } *d = (*d -= *c & **e != 4) && (4 != a) - **e & d == c; int g = &d; g++; } $time clang -c -w -O0 s.c real0m0.021s user0m0.011s sys 0m0.010s $clang -c -w -O1 test.cc //endless compiling (the same as -O2,-O3, and -Os options) $clang -v clang version 13.0.0 (https://github.com/llvm/llvm-project 22f00f61dd5483a9fdaed3b7592d392c23b3646a) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210216/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Candidate multilib: .;@m64 Selected multilib: .;@m64 This problem only occurs in clang-trunk and clang-11.0.0 or clang-11.0.1, while other released versions from clang-10 downwards perform well in this case. Thanks. Haoxin -- 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 49206] New: compile-time explosion with assumes at -O3 in clang-8.0 upwards versions
https://bugs.llvm.org/show_bug.cgi?id=49206 Bug ID: 49206 Summary: compile-time explosion with assumes at -O3 in clang-8.0 upwards versions Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: haoxi...@gmail.com CC: llvm-bugs@lists.llvm.org Hi, all. This code makes Clang-8.0 to clang-trunk versions hung on with -O3 at compile time. $cat s.c #include int a; int64_t b; void c(int d) { int e; uint64_t f; int16_t g; int8_t i = a; for (;;) { int16_t k = i; uint64_t *j = d; for (; k; k++) for (; e;) { uint64_t *m = &f; if ((e += g) <= 0) { *m &= 4; if (b || *j) { l: *j *= b; goto l; } } } } } $clang -c -w -O3 s.c //endless compiling $clang -v clang version 13.0.0 (https://github.com/llvm/llvm-project 22f00f61dd5483a9fdaed3b7592d392c23b3646a) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210216/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Candidate multilib: .;@m64 Selected multilib: .;@m64 Thanks, Haoxin -- 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 41282] [AMDGPU][MC] Invalid parsing of "no*" modifiers
https://bugs.llvm.org/show_bug.cgi?id=41282 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Fixed By Commit(s)||586df38 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 40872] [AMDGPU][MC] Different conversion rules for integer literals and expressions
https://bugs.llvm.org/show_bug.cgi?id=40872 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Fixed By Commit(s)||357262, d6827ce -- 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 40663] [AMDGPU][MC][DOC] Update assembler documentation with description of lds_direct
https://bugs.llvm.org/show_bug.cgi?id=40663 Dmitry changed: What|Removed |Added Status|NEW |RESOLVED Fixed By Commit(s)|artem.tama...@amd.com, |cef9d42 |valery.pykh...@gmail.com, | |andrey.kasau...@gmail.com, | |i.am.permi...@gmail.com,| |matthew.arsena...@amd.com | 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 36572] [AMDGPU][MC][DOC] Lack of detailed AMDGPU assembler documentation
https://bugs.llvm.org/show_bug.cgi?id=36572 Dmitry changed: What|Removed |Added Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)||338125, 365347, 365353, ||372857, 80c45e4, 2de2275, ||3f7985e -- 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 35730] [AMDGPU][MC] Incorrect parsing of flat/global atomic modifiers
https://bugs.llvm.org/show_bug.cgi?id=35730 Dmitry changed: What|Removed |Added Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)||321552 -- 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 49054] [AMDGPU][MC][GFX10] Incorrect error position for invalid dim modifier
https://bugs.llvm.org/show_bug.cgi?id=49054 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Fixed By Commit(s)||05433a8 -- 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 48884] [AMDGPU][MC] Parser may report an incorrect error position when there is no custom handler
https://bugs.llvm.org/show_bug.cgi?id=48884 Dmitry changed: What|Removed |Added Fixed By Commit(s)||99b5631 Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 48881] [AMDGPU][MC][GFX10] Incorrect NSA error position
https://bugs.llvm.org/show_bug.cgi?id=48881 Dmitry changed: What|Removed |Added Fixed By Commit(s)||D96118 Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] Issue 31008 in oss-fuzz: llvm:llvm-opt-fuzzer--x86_64-earlycse: ASSERT: (Ty->isIntOrIntVectorTy(BitWidth) || Ty->isPtrOrPtrVectorTy()) && "Not integer o
Status: New Owner: CC: k...@google.com, masc...@google.com, jdevl...@apple.com, igm...@gmail.com, d...@google.com, mit...@google.com, bigch...@gmail.com, eney...@google.com, llvm-...@lists.llvm.org, j...@chromium.org, v...@apple.com, mitch...@outlook.com, xpl...@gmail.com, akils...@apple.com Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible Engine-libfuzzer OS-Linux Proj-llvm Reported-2021-02-16 Type: Bug New issue 31008 by ClusterFuzz-External: llvm:llvm-opt-fuzzer--x86_64-earlycse: ASSERT: (Ty->isIntOrIntVectorTy(BitWidth) || Ty->isPtrOrPtrVectorTy()) && "Not integer o https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31008 Detailed Report: https://oss-fuzz.com/testcase?key=4512489419177984 Project: llvm Fuzzing Engine: libFuzzer Fuzz Target: llvm-opt-fuzzer--x86_64-earlycse Job Type: libfuzzer_asan_llvm Platform Id: linux Crash Type: ASSERT Crash Address: Crash State: (Ty->isIntOrIntVectorTy(BitWidth) || Ty->isPtrOrPtrVectorTy()) && "Not integer o computeKnownBits computeKnownBits Sanitizer: address (ASAN) Regressed: https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201801240651:201801250632 Reproducer Testcase: https://oss-fuzz.com/download?testcase_id=4512489419177984 Issue filed automatically. See https://google.github.io/oss-fuzz/advanced-topics/reproducing for instructions to reproduce this bug locally. When you fix this bug, please * mention the fix revision(s). * state whether the bug was a short-lived regression or an old bug in any stable releases. * add any other useful information. This information can help downstream consumers. If you need to contact the OSS-Fuzz team with a question, concern, or any other feedback, please file an issue at https://github.com/google/oss-fuzz/issues. Comments on individual Monorail issues are not monitored. -- You received this message because: 1. You were specifically CC'd on the issue You may adjust your notification preferences at: https://bugs.chromium.org/hosting/settings Reply to this email to add a comment.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 48596] [AMDGPU][MC] Insufficient diagnostic messages for invalid v_interp operands
https://bugs.llvm.org/show_bug.cgi?id=48596 Dmitry changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)||8c25bb3 -- 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 48515] [AMDGPU][MC] Common code patterns in parser
https://bugs.llvm.org/show_bug.cgi?id=48515 Dmitry changed: What|Removed |Added Fixed By Commit(s)||8ab5770, 5b17263 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 48295] [AMDGPU][MC] Misleading diagnostics message for operands specified as expr/macro
https://bugs.llvm.org/show_bug.cgi?id=48295 Dmitry changed: What|Removed |Added Status|NEW |RESOLVED Fixed By Commit(s)||a0b3a93 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 47518] [AMDGPU][MC] Incorrect error position
https://bugs.llvm.org/show_bug.cgi?id=47518 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Fixed By Commit(s)||ce44bf2 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 48240] [AMDGPU][MC] Incorrect position for constant bus related errors
https://bugs.llvm.org/show_bug.cgi?id=48240 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Fixed By Commit(s)||ce44bf2 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 48239] [AMDGPU][MC] Poor error messages for invalid literals
https://bugs.llvm.org/show_bug.cgi?id=48239 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Fixed By Commit(s)||e4effef -- 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 48171] [AMDGPU][MC] Incorrect error position for hwreg() and sendmsg() operands
https://bugs.llvm.org/show_bug.cgi?id=48171 Dmitry changed: What|Removed |Added Fixed By Commit(s)||89df8fc 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 48170] [AMDGPU][MC] Incorrect error position for swizzle() operands
https://bugs.llvm.org/show_bug.cgi?id=48170 Dmitry changed: What|Removed |Added Resolution|--- |FIXED Fixed By Commit(s)||0bee8c7 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 41303] [AMDGPU][MC] Assembler provides insufficient information when syntax errors occur
https://bugs.llvm.org/show_bug.cgi?id=41303 Dmitry changed: What|Removed |Added Fixed By Commit(s)||168ccc8, 558b3bb, 55c557a, ||911961c, 8c25bb3, a0b3a93, ||ce44bf2, e4effef 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 48902] [meta] 12.0.0 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=48902 Bug 48902 depends on bug 49149, which changed state. Bug 49149 Summary: Exegesis commit 8383fddc4fa9 breaks aarch64-windows-msvc build https://bugs.llvm.org/show_bug.cgi?id=49149 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 49149] Exegesis commit 8383fddc4fa9 breaks aarch64-windows-msvc build
https://bugs.llvm.org/show_bug.cgi?id=49149 Maxim Kuvyrkov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Maxim Kuvyrkov --- Cherry-picked to release/12.x as d5d089bf08c9181134d00e74d61a12f808c3e0c3 -- 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 47506] [X86][AVX512] Convert _mm_reduce_* intrinsics to emit llvm.reduction intrinsics in IR
https://bugs.llvm.org/show_bug.cgi?id=47506 Simon Pilgrim changed: What|Removed |Added Fixed By Commit(s)|6c23cbc5603c,4855a1004d4d |6c23cbc5603c,4855a1004d4d,6 ||1da20575d6c Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #7 from Simon Pilgrim --- fmin/fmax reductions - https://reviews.llvm.org/D93179 rG61da20575d6c Thanks to @pengfei for completing the work on this (and @spatel for some of the FMF reduction subtleties). -- 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 49207] New: Misuse of libomptarget plugin interface
https://bugs.llvm.org/show_bug.cgi?id=49207 Bug ID: 49207 Summary: Misuse of libomptarget plugin interface Product: OpenMP Version: unspecified Hardware: PC OS: All Status: NEW Severity: release blocker Priority: P Component: Runtime Library Assignee: unassignedb...@nondot.org Reporter: tianshilei1...@gmail.com CC: llvm-bugs@lists.llvm.org This bug was reported by Guilherme Valarini via Openmp-dev (openmp-...@lists.llvm.org). The link is https://lists.llvm.org/pipermail/openmp-dev/2021-February/003867.html The following is the bug description. In both cases, the address to a local variable is passed as the host data to be copied to the target device, but since this function can be asynchronously executed, such variables can get out of scope when the actual submission is done. ``` // File: openmp/libomptarget/src/omptarget.cpp:419 if (arg_types[i] & OMP_TGT_MAPTYPE_PTR_AND_OBJ && !IsHostPtr) { DP("Update pointer (" DPxMOD ") -> [" DPxMOD "]\n", DPxPTR(PointerTgtPtrBegin), DPxPTR(TgtPtrBegin)); uint64_t Delta = (uint64_t)HstPtrBegin - (uint64_t)HstPtrBase; void *TgtPtrBase = (void *)((uint64_t)TgtPtrBegin - Delta); int rt = Device.submitData(PointerTgtPtrBegin, &TgtPtrBase, sizeof(void *), async_info_ptr); if (rt != OFFLOAD_SUCCESS) { REPORT("Copying data to device failed.\n"); return OFFLOAD_FAIL; } // create shadow pointers for this entry Device.ShadowMtx.lock(); Device.ShadowPtrMap[Pointer_HstPtrBegin] = { HstPtrBase, PointerTgtPtrBegin, TgtPtrBase}; Device.ShadowMtx.unlock(); } ``` ``` // File: openmp/libomptarget/src/omptarget.cpp:1141 DP("Parent lambda base " DPxMOD "\n", DPxPTR(TgtPtrBase)); uint64_t Delta = (uint64_t)HstPtrBegin - (uint64_t)HstPtrBase; void *TgtPtrBegin = (void *)((uintptr_t)TgtPtrBase + Delta); void *PointerTgtPtrBegin = Device.getTgtPtrBegin( HstPtrVal, ArgSizes[I], IsLast, false, IsHostPtr); if (!PointerTgtPtrBegin) { DP("No lambda captured variable mapped (" DPxMOD ") - ignored\n", DPxPTR(HstPtrVal)); continue; } if (PM->RTLs.RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY && TgtPtrBegin == HstPtrBegin) { DP("Unified memory is active, no need to map lambda captured" "variable (" DPxMOD ")\n", DPxPTR(HstPtrVal)); continue; } DP("Update lambda reference (" DPxMOD ") -> [" DPxMOD "]\n", DPxPTR(PointerTgtPtrBegin), DPxPTR(TgtPtrBegin)); Ret = Device.submitData(TgtPtrBegin, &PointerTgtPtrBegin, sizeof(void *), AsyncInfo); if (Ret != OFFLOAD_SUCCESS) { REPORT("Copying data to device failed.\n"); return OFFLOAD_FAIL; } ``` -- 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 49082] Machine Outliner outlines ARC marker changing program behavior
https://bugs.llvm.org/show_bug.cgi?id=49082 Florian Hahn changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)||ed4718eccb12, ca23b2c8ed27 --- Comment #5 from Florian Hahn --- The required fixes should be on main now: https://reviews.llvm.org/rGed4718eccb12 https://reviews.llvm.org/rGca23b2c8ed27 It would be great if you could check if the issue is now fixed on current main and re-open the issue if that is not the 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 49208] New: Wrong optimization around memset
https://bugs.llvm.org/show_bug.cgi?id=49208 Bug ID: 49208 Summary: Wrong optimization around memset Product: new-bugs Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: bogdan.gur...@gmail.com CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org Created attachment 24539 --> https://bugs.llvm.org/attachment.cgi?id=24539&action=edit The input llvm code The attached example should be run with the O2 optimization level. The 'memset' memory pointer argument is replaced by the 'undef' which causes unexpected behavior at runtime. I don't see any reason to replace it with 'undef' since there are writers and external function calls that are related to this memory pointer. Command line: "C:\Program Files\LLVM\bin\clang.exe" -S -emit-llvm d:\work\test.bc -o d:\work\test_out.bc -O2 I compared the input and output and the only replacement is: from: ``` %15 = load i8*, i8** %4, align 8, !tbaa !6 %16 = shl nsw i64 %14, 1 call void @llvm.memset.p0i8.i64(i8* align 2 %15, i8 0, i64 %16, i1 false) #0 ``` to: ``` %15 = shl nsw i64 %14, 1 call void @llvm.memset.p0i8.i64(i8* align 2 undef, i8 0, i64 %15, i1 false) #0 ``` -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 49209] New: [X86] support for -mstack-protector-guard-symbol=
https://bugs.llvm.org/show_bug.cgi?id=49209 Bug ID: 49209 Summary: [X86] support for -mstack-protector-guard-symbol= Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: ndesaulni...@google.com CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk, xiang1.zh...@intel.com Blocks: 4068 via https://lore.kernel.org/lkml/c0ff7dba14041c7e5d1cae5d4df052f03759bef3.1613243844.git.l...@kernel.org/, the Linux kernel is looking to use the pair of flags: -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard for 32b x86 kernels. It seems that clang does not yet support -mstack-protector-guard-symbol=__stack_chk_guard Referenced Bugs: https://bugs.llvm.org/show_bug.cgi?id=4068 [Bug 4068] [Meta] Compiling the Linux kernel with clang -- 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 49210] New: Fuse v128.load64_zero + iXX.widen_low into Load-and-Extend
https://bugs.llvm.org/show_bug.cgi?id=49210 Bug ID: 49210 Summary: Fuse v128.load64_zero + iXX.widen_low into Load-and-Extend Product: libraries Version: trunk Hardware: All OS: All Status: NEW Severity: enhancement Priority: P Component: Backend: WebAssembly Assignee: tliv...@google.com Reporter: mara...@gmail.com CC: llvm-bugs@lists.llvm.org Even though x86 SSE4 provides load-and-extend instructions (PMOVSXxx/PMOVZXxx), it don't provide the corresponding intrinsics. Commonly, these instruction forms are exposed as a combination of 8-byte load (which implicitly zeroes the upper 8 bytes) and conversion intrinsics, e.g. _mm_cvtepi16_epi32(_mm_loadl_epi64(ptr)). When such codes are cross-compiled to x86 using Emscripten's nmmintrin.h header, they will generate two WebAssembly SIMD instructions, v128.load64_zero and i32x4.widen_low_i16x8_s, which would subsequently lower into two x86 instructions by a WAsm engine. LLVM should learn to fuse v128.load64_zero + i32x4.widen_low_i16x8_s into v128.load16x4_s, so that codes cross-compiled from x86 SSE4 intrinsics generate the same instructions in a WAsm engine as they do in native compilation. -- 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 49211] New: unable to execute command: Segmentation fault
https://bugs.llvm.org/show_bug.cgi?id=49211 Bug ID: 49211 Summary: unable to execute command: Segmentation fault Product: clang Version: unspecified Hardware: PC OS: All Status: NEW Severity: release blocker Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: fangd...@fb.com CC: blitzrak...@gmail.com, dgre...@apple.com, erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk command: buck build @mode/opt-asan admarket/adreview/service:adreviewservice stack-trace: Traceback (most recent call last): File "/remote_execution/tmp/execution/11/c9d410ef2d73492cbfc8358cb8ef73bb/work/fbcode/buck-out/opt/gen/tools/build/buck/wrappers/__fbcc__/sh_binary.4MCJjtYIjV/__default__/tools/build/buck/wrappers/fbcc.py", line 87, in rc = run_async_tool(run_jobs) File "/remote_execution/tmp/execution/11/c9d410ef2d73492cbfc8358cb8ef73bb/work/fbcode/tools/build/buck/wrappers/lib/FBCCAsyncEnv.py", line 153, in run_async_tool assert exit_code < 128 AssertionError Cannot execute a rule out of process. On RE worker. Thread: Thread[main,5,main] Command failed with exit code 1. command: [/remote_execution/tmp/execution/11/c9d410ef2d73492cbfc8358cb8ef73bb/work/fbcode/buck-out/opt/gen/tools/build/buck/wrappers/__fbcc__/fbcc.sh, --cc=/remote_execution/tmp/execution/11/c9d410ef2d73492cbfc8358cb8ef73bb/work/fbcode/third-party-buck/platform007/build/llvm-fb/bin/clang++, -nostdinc, -resource-dir, /remote_exe... ... -- 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 49208] Wrong optimization around memset
https://bugs.llvm.org/show_bug.cgi?id=49208 Nikita Popov changed: What|Removed |Added Resolution|--- |INVALID Status|NEW |RESOLVED CC||nikita@gmail.com --- Comment #1 from Nikita Popov --- You have an incorrectly placed call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %2) call after a number of stores already happened into the alloca. lifetime.start effectively overwrites the alloca with undef, thus the observed behavior. -- 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 49212] New: Clang should warn when std::isinf is compiled with -ffast-math
https://bugs.llvm.org/show_bug.cgi?id=49212 Bug ID: 49212 Summary: Clang should warn when std::isinf is compiled with -ffast-math Product: clang Version: unspecified Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: bmo...@google.com CC: blitzrak...@gmail.com, dgre...@apple.com, erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk When -ffast-math is enabled, Clang can optimize away calls to std::isinf (and similar functions such as std::isnan) in ways that may be surprising. As one of my colleagues said, "I thought -ffast-math only affected stuff like reordering operations in mathematically-but-not-numerically-equivalent ways and wouldn't affect stuff like isinf or isnan." Can we add a warning for the case where std::isinf and similar functions are invoked in code compiled with -ffast-math? This warning would also likely have made the confusing interaction of options in bug 33510 immediately obvious, rather than requiring the user to notice that their NaN handling wasn't working as expected. -- 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 49207] Misuse of libomptarget plugin interface
https://bugs.llvm.org/show_bug.cgi?id=49207 Johannes Doerfert changed: What|Removed |Added Fixed By Commit(s)||167738c6bb01726133f5016e743 ||bdaf341a87169 Resolution|--- |FIXED Status|CONFIRMED |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 48902] [meta] 12.0.0 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=48902 Bug 48902 depends on bug 49207, which changed state. Bug 49207 Summary: Misuse of libomptarget plugin interface https://bugs.llvm.org/show_bug.cgi?id=49207 What|Removed |Added Status|CONFIRMED |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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 49162] Wrong code generated for code sequence shl/ashr/trunc/ashr
https://bugs.llvm.org/show_bug.cgi?id=49162 Tom Stellard changed: What|Removed |Added Fixed By Commit(s)|5ca3ef98a71598d368f6f4aaf0b |5ca3ef98a71598d368f6f4aaf0b |385b50b67ce4a |385b50b67ce4a |7ad0c573bd4a68dc81886037457 |7ad0c573bd4a68dc81886037457 |d47daa3d6aa24 |d47daa3d6aa24 d44bf3332b31 ||d9910c24fe19 Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Tom Stellard --- Merged: d9910c24fe19 -- 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 48902] [meta] 12.0.0 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=48902 Bug 48902 depends on bug 49162, which changed state. Bug 49162 Summary: Wrong code generated for code sequence shl/ashr/trunc/ashr https://bugs.llvm.org/show_bug.cgi?id=49162 What|Removed |Added Status|CONFIRMED |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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 48877] [X86] Missing VEX_WIG from a bunch of AVX instruction definitions.
https://bugs.llvm.org/show_bug.cgi?id=48877 Tom Stellard changed: What|Removed |Added Fixed By Commit(s)|e9514429a02b1e4f8b9d54b28a9 |e9514429a02b1e4f8b9d54b28a9 |34bfa9bd246ec |34bfa9bd246ec |4d904776a77aa80342c65cf72a9 |4d904776a77aa80342c65cf72a9 |62920cc9d1fa9 |62920cc9d1fa9 439fd4bd6a75 ||fa9dc0c60cbc Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Tom Stellard --- Merged: fa9dc0c60cbc -- 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 10988] x86 MC encoder and disassembler bugs umbrella
https://bugs.llvm.org/show_bug.cgi?id=10988 Bug 10988 depends on bug 48877, which changed state. Bug 48877 Summary: [X86] Missing VEX_WIG from a bunch of AVX instruction definitions. https://bugs.llvm.org/show_bug.cgi?id=48877 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 48902] [meta] 12.0.0 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=48902 Bug 48902 depends on bug 48877, which changed state. Bug 48877 Summary: [X86] Missing VEX_WIG from a bunch of AVX instruction definitions. https://bugs.llvm.org/show_bug.cgi?id=48877 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 48998] ClangdTests/GlobalCompilationDatabaseTest.BuildDir sometimes goes in an infinite loop
https://bugs.llvm.org/show_bug.cgi?id=48998 Tom Stellard changed: What|Removed |Added Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)|6ac3fd9706047304c52a6788841 |6ac3fd9706047304c52a6788841 |22a3a6bc55432 |22a3a6bc55432 f23ee06ec27e --- Comment #9 from Tom Stellard --- Merged: f23ee06ec27e -- 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 48902] [meta] 12.0.0 Release Blockers
https://bugs.llvm.org/show_bug.cgi?id=48902 Bug 48902 depends on bug 48998, which changed state. Bug 48998 Summary: ClangdTests/GlobalCompilationDatabaseTest.BuildDir sometimes goes in an infinite loop https://bugs.llvm.org/show_bug.cgi?id=48998 What|Removed |Added Status|CONFIRMED |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 https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 49213] New: [MIScheduler] Bad machine code: Live segment doesn't end at a valid instruction
https://bugs.llvm.org/show_bug.cgi?id=49213 Bug ID: 49213 Summary: [MIScheduler] Bad machine code: Live segment doesn't end at a valid instruction Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: pauls...@linux.vnet.ibm.com CC: llvm-bugs@lists.llvm.org Created attachment 24543 --> https://bugs.llvm.org/attachment.cgi?id=24543&action=edit reduced testcase llc -mcpu=arch13 -O3 -disable-machine-dce -verify-misched tc_crash3_aftercreduce.ll # Before machine scheduling. ** INTERVALS ** %0 [320r,320d:0) 0@320r weight:0.00e+00 %1 [176r,224d:0) 0@176r weight:0.00e+00 %3 [96r,176r:0) 0@96r weight:0.00e+00 %12 [16r,32r:0) 0@16r weight:0.00e+00 RegMasks: ** MACHINEINSTRS ** # Machine code for function f: NoPHIs, TracksLiveness, TiedOpsRewritten 0B bb.0.bb: successors: %bb.2(0x8000), %bb.1(0x); %bb.2(100.00%), %bb.1(0.00%) 16B %12:grx32bit = LHIMux 0 32B CHIMux %12:grx32bit, 0, implicit-def $cc 48B BRC 14, 6, %bb.2, implicit killed $cc 64B J %bb.1 80B bb.1.bb2: ; predecessors: %bb.0 96B %3:gr64bit = LGRL @b :: (dereferenceable load 8 from `i144* bitcast (%0* @b to i144*)`) 176B %1:gr64bit = SRLG %3:gr64bit, $noreg, 16 320B dead %0:gr64bit = LGHI 0 336Bbb.2.bb4: ; predecessors: %bb.0 352B Return # End machine code for function f. *** Bad machine code: Live segment doesn't end at a valid instruction *** - function:f - basic block: %bb.1 bb2 (0x712edf0) [80B;336B) - liverange: [176r,224d:0) 0@176r - v. register: %1 - segment: [176r,224d:0) LLVM ERROR: Found 1 machine code errors. -- 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 49214] New: [NewPM] Failure to build SPEC17 (compiler hang)
https://bugs.llvm.org/show_bug.cgi?id=49214 Bug ID: 49214 Summary: [NewPM] Failure to build SPEC17 (compiler hang) Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: pauls...@linux.vnet.ibm.com CC: llvm-bugs@lists.llvm.org Created attachment 24544 --> https://bugs.llvm.org/attachment.cgi?id=24544&action=edit .bc file (compressed tar file) This file takes 10s with legacy-pass-manager, but does not terminate with new PM: clang-13 -cc1 -triple s390x-ibm-linux -S -save-temps=cwd -disable-free -main-file-name rna_nodetree_gen.c -mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -target-cpu z14 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -O3 -std=c99 -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o rna_nodetree_gen.s -x ir rna_nodetree_gen.bc -fdebug-pass-manager &> out There seems to be a set of loop passes running over and over on the same loop: 43 Running pass: SimpleLoopUnswitchPass on Loop at depth 1 containing: %for.body 48 Running pass: LICMPass on Loop at depth 1 containing: %for.body 249 Running pass: IndVarSimplifyPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopDeletionPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopFullUnrollPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopIdiomRecognizePass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopInstSimplifyPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopRotatePass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: LoopSimplifyCFGPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 249 Running pass: SimpleLoopUnswitchPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 498 Running pass: LICMPass on Loop at depth 1 containing: %land.rhs.i,%while.body.i 498 times of LICMPass on same loop - 249 times for the others...? -- 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 49215] New: Regression (12.0) Assertion `ValTy->isFPOrFPVectorTy() && "Expected float point or integer vector type."' failed
https://bugs.llvm.org/show_bug.cgi?id=49215 Bug ID: 49215 Summary: Regression (12.0) Assertion `ValTy->isFPOrFPVectorTy() && "Expected float point or integer vector type."' failed Product: new-bugs Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: b...@lindev.ch CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org Created attachment 24545 --> https://bugs.llvm.org/attachment.cgi?id=24545&action=edit Reduced test case Building the attached test case with clang [today's 12.0 branch] with SSE4.2 enabled (-msse4.2 or -march=znver1 or any other -march= that enables sse4.2) results in $ clang++ -c test.ii -o test.o -O2 -msse4.2 clang++: /home/bero/abf/llvm/BUILD/llvm-project-release-12.x/llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3717: int llvm::X86TTIImpl::getMinMaxReductionCost(llvm::VectorType *, llvm::VectorType *, bool, bool, TTI::TargetCostKind): Assertion `ValTy->isFPOrFPVectorTy() && "Expected float point or integer vector type."' 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: clang++ -c test.ii -o test.o -O2 -march=znver1 1. parser at end of file 2. Optimizer #0 0x7f4c35702ce1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib64/libLLVMSupport.so.12.0+0x235ce1) #1 0x7f4c35702fbd (/usr/lib64/libLLVMSupport.so.12.0+0x235fbd) #2 0x7f4c3570090a llvm::sys::RunSignalHandlers() (/usr/lib64/libLLVMSupport.so.12.0+0x23390a) #3 0x7f4c35701efb llvm::sys::CleanupOnSignal(unsigned long) (/usr/lib64/libLLVMSupport.so.12.0+0x234efb) #4 0x7f4c35612035 (/usr/lib64/libLLVMSupport.so.12.0+0x145035) #5 0x7f4c35612245 (/usr/lib64/libLLVMSupport.so.12.0+0x145245) #6 0x7f4c351399c0 __restore_rt (/lib64/libc.so.6+0x409c0) #7 0x7f4c3513993f raise (/lib64/libc.so.6+0x4093f) #8 0x7f4c3511f538 abort (/lib64/libc.so.6+0x26538) #9 0x7f4c3511f421 _nl_load_domain.cold (/lib64/libc.so.6+0x26421) #10 0x7f4c35130c82 (/lib64/libc.so.6+0x37c82) #11 0x7f4c3a56d991 llvm::X86TTIImpl::getMinMaxReductionCost(llvm::VectorType*, llvm::VectorType*, bool, bool, llvm::TargetTransformInfo::TargetCostKind) (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x530991) #12 0x7f4c3a573a83 (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x536a83) #13 0x7f4c3a56a012 (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x52d012) #14 0x7f4c3a56ace6 llvm::X86TTIImpl::getIntrinsicInstrCost(llvm::IntrinsicCostAttributes const&, llvm::TargetTransformInfo::TargetCostKind) (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x52dce6) #15 0x7f4c3a56341b (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x52641b) #16 0x7f4c3a560047 (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x523047) #17 0x7f4c3687879f llvm::TargetTransformInfo::getUserCost(llvm::User const*, llvm::ArrayRef, llvm::TargetTransformInfo::TargetCostKind) const (/usr/lib64/libLLVMAnalysis.so.12.0+0x5ab79f) #18 0x7f4c365e7269 (/usr/lib64/libLLVMAnalysis.so.12.0+0x31a269) #19 0x7f4c365e6d1a llvm::CodeMetrics::analyzeBasicBlock(llvm::BasicBlock const*, llvm::TargetTransformInfo const&, llvm::SmallPtrSetImpl const&, bool) (/usr/lib64/libLLVMAnalysis.so.12.0+0x319d1a) #20 0x7f4c378941c5 (/usr/lib64/libLLVMScalarOpts.so.12.0+0x3541c5) #21 0x7f4c37894eef llvm::LoopUnrollPass::run(llvm::Function&, llvm::AnalysisManager&) (/usr/lib64/libLLVMScalarOpts.so.12.0+0x354eef) #22 0x7f4c349b8d3f (/usr/lib64/libLLVMPasses.so.12.0+0x181d3f) #23 0x7f4c35c73456 llvm::PassManager >::run(llvm::Function&, llvm::AnalysisManager&) (/usr/lib64/libLLVMCore.so.12.0+0x42c456) #24 0x7f4c3c7c3c3f (/usr/lib64/libLLVMAMDGPUCodeGen.so.12.0+0x56ec3f) #25 0x7f4c35c78ab9 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager&) (/usr/lib64/libLLVMCore.so.12.0+0x431ab9) #26 0x7f4c3c7c399f (/usr/lib64/libLLVMAMDGPUCodeGen.so.12.0+0x56e99f) #27 0x7f4c35c71ad9 llvm::PassManager >::run(llvm::Module&, llvm::AnalysisManager&) (/usr/lib64/libLLVMCore.so.12.0+0x42aad9) #28 0x7f4c38d28922 (/usr/lib64/libclangCodeGen.so.12.0+0x2a1922) #29 0x7f4c38d21037 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr >) (/usr/lib64/libclangCodeGen.so.12.0+0x29a037) #30 0x7f4c3908b60f (/usr/lib64/libclangCodeGen.so.12.0+0x60460f) #31 0x7f4c32f22515 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib64/libclangParse.so.12.0+0x70515) #32 0x7f4c3731744f clang::ASTFrontendAction::ExecuteAction() (/usr/lib64/libclangFrontend.so.12.0+0x1ab44f) #33