<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - InnerLoopVectorizer::emitSCEVChecks(llvm::Loop *, llvm::BasicBlock *): Assertion `!Cost->foldTailByMasking() && "Cannot check stride when folding tail"' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=39417">39417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>InnerLoopVectorizer::emitSCEVChecks(llvm::Loop *, llvm::BasicBlock  *): Assertion `!Cost->foldTailByMasking() && "Cannot check stride when  folding tail"' failed.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bjorn.a.pettersson@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21030" name="attach_21030" title="reduced reproducer">attachment 21030</a> <a href="attachment.cgi?id=21030&action=edit" title="reduced reproducer">[details]</a></span>
reduced reproducer

With

  opt bbi-19959.ll -S -o - --loop-vectorize

I hit a new assert that was added in the commit "[llvm] r344743 - [LV] Fold
tail by masking to vectorize loops of arbitrary trip count under opt for size"

opt: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2519: void 
llvm::InnerLoopVectorizer::emitSCEVChecks(llvm::Loop *, llvm::BasicBlock 
*): Assertion `!Cost->foldTailByMasking() && "Cannot check stride when 
folding tail"' failed.
Stack dump:
0.      Program arguments: build-all/bin/opt bbi-19959.ll -S -o - 
--loop-vectorize
1.      Running pass 'Function Pass Manager' on module 'bbi-19959.ll'.
2.      Running pass 'Loop Vectorization' on function '@func_34'
build-all/bin/opt[0x218e074]
build-all/bin/opt(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x218c1d0]
build-all/bin/opt[0x218e3d8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f4842f2f330]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f4841b1ec37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f4841b22028]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fbf6)[0x7f4841b17bf6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fca2)[0x7f4841b17ca2]
build-all/bin/opt(_ZN4llvm19InnerLoopVectorizer14emitSCEVChecksEPNS_4LoopEPNS_10BasicBlockE+0x375)[0x22a3635]
build-all/bin/opt(_ZN4llvm19InnerLoopVectorizer28createVectorizedLoopSkeletonEv+0x276)[0x22a3b26]
build-all/bin/opt(_ZN4llvm24LoopVectorizationPlanner11executePlanERNS_19InnerLoopVectorizerEPNS_13DominatorTreeE+0x121)[0x22b9f21]
build-all/bin/opt(_ZN4llvm17LoopVectorizePass11processLoopEPNS_4LoopE+0x367d)[0x22c40bd]
build-all/bin/opt(_ZN4llvm17LoopVectorizePass7runImplERNS_8FunctionERNS_15ScalarEvolutionERNS_8LoopInfoERNS_19TargetTransformInfoERNS_13DominatorTreeERNS_18BlockFrequencyInfoEPNS_17TargetLibraryInfoERNS_12DemandedBitsERNS_9AAResultsERNS_15AssumptionCacheERSt8functionIFRKNS_14LoopAccessInfoERNS_4LoopEEERNS_25OptimizationRemarkEmitterE+0x1d7)[0x22c5dc7]
build-all/bin/opt[0x22cdccb]
build-all/bin/opt(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x1bd)[0x1bc0acd]
build-all/bin/opt(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x28)[0x1bc0d88]
build-all/bin/opt(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x30a)[0x1bc11ea]
build-all/bin/opt(main+0x2964)[0x773734]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f4841b09f45]
build-all/bin/opt[0x75912d]
Abort</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>