[llvm-bugs] [Bug 35925] New: -Wpass-failed not always working

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 12 04:04:23 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35925

            Bug ID: 35925
           Summary: -Wpass-failed not always working
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: llvm-bugs at lists.llvm.org

Some unvectorizable code:

void foo(int r[8], int* ptr)
{
    #pragma clang loop vectorize(enable)
    // or: #pragma omp simd
    for (int j = 0; j < 8; ++j)
        if (r[j] < 1000)
            r[j] = *ptr++;
}

$ clang -Werror=pass-failed -O3
compiles just fine because the loop unroller takes precedence.
Only when adding -fno-unroll-loops it produces the warning as expected:
https://godbolt.org/g/eiEB7G.

This has been noted in 2015 already:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044264.html
"We should extend the diagnostics to all passes that could remove a loop"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180112/bc84cb3d/attachment.html>


More information about the llvm-bugs mailing list