[llvm-bugs] [Bug 42512] New: [SystemZ] Cannot select SystemZISD::GET_CCMASK with usubo

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 4 09:42:44 PDT 2019


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

            Bug ID: 42512
           Summary: [SystemZ] Cannot select SystemZISD::GET_CCMASK with
                    usubo
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org

target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
target triple = "s390x-unknown-linux-gnu"

define i8 @test(i8 %x) {
  %usubo = tail call { i64, i1 } @llvm.usub.with.overflow.i64(i64 undef, i64 1)
  %ov = extractvalue { i64, i1 } %usubo, 1
  %ovext = zext i1 %ov to i8
  %ret = add i8 %x, %ovext
  ret i8 %ret
}

; Function Attrs: nounwind readnone speculatable
declare { i64, i1 } @llvm.usub.with.overflow.i64(i64, i64) #0

attributes #0 = { nounwind readnone speculatable }


Produces:


LLVM ERROR: Cannot select: t21: i32 = SystemZISD::GET_CCMASK t34,
Constant:i32<15>, Constant:i32<3>
  t34: i32 = srl t32, Constant:i32<31>
    t32: i32 = add t30, Constant:i32<-536870912>
      t30: i32 = SystemZISD::IPM t26:1
        t26: i64,i32 = SystemZISD::USUBO undef:i64, Constant:i64<1>
          t4: i64 = undef
          t5: i64 = Constant<1>
      t31: i32 = Constant<-536870912>
    t33: i32 = Constant<31>
  t20: i32 = Constant<15>
  t19: i32 = Constant<3>
In function: test

-- 
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/20190704/f463ce84/attachment.html>


More information about the llvm-bugs mailing list