<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 - Isel crash with large constant (csmith)"
   href="https://bugs.llvm.org/show_bug.cgi?id=34859">34859</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Isel crash with large constant (csmith)
          </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>enhancement
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This (reduced) program:

@g_272 = external global i64, align 8
@g_276 = external global i16, align 2

; Function Attrs: noreturn nounwind
define void @main(i32 signext) local_unnamed_addr #0 {
  store i16 -1, i16* @g_276, align 2
  %2 = load i16, i16* @g_276, align 2
  %3 = icmp ne i16 %2, 0
  %4 = zext i1 %3 to i64
  %5 = or i64 %4, 3944173009226982604
  store i64 %5, i64* @g_272, align 8
  tail call void @transparent_crc(i64 3944173009226982604, i32 signext undef)
  unreachable
}

declare void @transparent_crc(i64, i32 signext) local_unnamed_addr #1

+
bin/llc -mtriple=s390x-linux-gnu -mcpu=z13

crashes with

LLVM ERROR: Cannot select: t47: i64 = Constant<3944173007420784641>

DAG:

Optimized legalized selection DAG: BB#0 'main:'
SelectionDAG has 25 nodes:
  t0: ch = EntryToken
          t45: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64<i16*
@g_276> 0
        t41: ch = store<ST2[@g_276], trunc to i16> t0, Constant:i32<65535>,
t45, undef:i64
          t18: i64 = or Constant:i64<1>,
OpaqueConstant:i64<3944173009226982604>
          t43: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64<i64*
@g_272> 0
        t34: ch = store<ST8[@g_272]> t0, t18, t43, undef:i64
      t35: ch = TokenFactor t41, t34
    t24: ch,glue = callseq_start t35, TargetConstant:i64<0>,
TargetConstant:i64<0>
  t28: ch,glue = CopyToReg t24, Register:i64 %R2D,
OpaqueConstant:i64<3944173009226982604>
  t30: ch,glue = CopyToReg t28, Register:i64 %R3D, Constant:i64<0>, t28:1
    t26: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64<void (i64,
i32)* @transparent_crc> 0
  t32: ch,glue = SystemZISD::CALL t30, t26, Register:i64 %R2D, Register:i64
%R3D, RegisterMask:Untyped, t30:1
  t33: ch,glue = callseq_end t32, TargetConstant:i64<0>, TargetConstant:i64<0>,
t32:1</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>