<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - thumbv7 instruction selection failure v2i64 = cttz" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23988&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=UTMtiGUoCPBGy2Yf_M_wgFbBFUvudYjA5uJwCn3fR3k&s=kJRNzE4kG7mehcpZ8B7vDD2m9wz7UX-mQsENQL8Vx3M&e=">23988</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>thumbv7 instruction selection failure v2i64 = cttz
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chh@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14532" name="attach_14532" title="preprocessed .cpp file and compilation command">attachment 14532</a> <a href="attachment.cgi?id=14532&action=edit" title="preprocessed .cpp file and compilation command">[details]</a></span>
preprocessed .cpp file and compilation command

Enclosed are script and source to reproduce a crash in NDK clang (*1).  It
crashes upstream clang too (revision 239800).  Looks like cost model has
changed which invalidates the workaround for the last crash: 
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__android-2Dreview.googlesource.com_-23_c_120011_1_lib_Target_ARM_ARMTargetTransformInfo.cpp&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=UTMtiGUoCPBGy2Yf_M_wgFbBFUvudYjA5uJwCn3fR3k&s=siFjw4vs2B2zuW4X99cQDL7IzeIX2mGrefU0ZqHVNNI&e=">https://android-review.googlesource.com/#/c/120011/1/lib/Target/ARM/ARMTargetTransformInfo.cpp</a>
.  Investigating

fatal error: error in backend: Cannot select: 0xe035d80: v2i64 = cttz 0xe035264
[ORD=4] [ID=34]
dbg:/usr/local/google/_blaze_wuu/7e341fa8ce94ae7e022303126d53824a/google3/util/bits/bits.h:297:10
  0xe035264: v2i64 = bitcast 0xe03649c [ORD=3] [ID=28]
dbg:/usr/local/google/_blaze_wuu/7e341fa8ce94ae7e022303126d53824a/google3/util/geometry/s2cellid.h:438:49
    0xe03649c: v2f64,ch = load 0xd66fd20, 0xdfa70ec,
0xe035408<LD16[%lsr.iv2022](align=1)> [ORD=3] [ID=23]
dbg:/usr/local/google/_blaze_wuu/7e341fa8ce94ae7e022303126d53824a/google3/util/geometry/s2cellid.h:438:49
      0xdfa70ec: i32,ch = CopyFromReg 0xd66fd20, 0xdfaac80 [ORD=2] [ID=18]
        0xdfaac80: i32 = Register %vreg7 [ID=1]
      0xe035408: i32 = undef [ID=3]
In function: _ZNK11S2CellUnion16LeafCellsCoveredEv</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>