[llvm-bugs] [Bug 34859] New: Isel crash with large constant (csmith)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 6 00:56:45 PDT 2017


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

            Bug ID: 34859
           Summary: Isel crash with large constant (csmith)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

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

-- 
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/20171006/720fa892/attachment.html>


More information about the llvm-bugs mailing list