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

            Bug ID: 41780
           Summary: [SystemZ]  Assertion "Invalid truncate node, src <
                    dst!" failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedb...@nondot.org
          Reporter: pauls...@linux.vnet.ibm.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 21901
  --> https://bugs.llvm.org/attachment.cgi?id=21901&action=edit
reduced test case

llc -mcpu=z13 -O3 -o out.s ./tc_invalidtrunc.ll

SystemZTargetLowering::combineExtract() tries to truncate from i16 to i32.


I am a bit confused about all the implications of extracting a vector element
from a BUILD_VECTOR using possibly another vector type (VecVT) (?), so I have
not attempted a patch yet.

The comment "We're extracting the low part of one operand of the
BUILD_VECTOR.": does this mean we are expecting at this point to truncate the
value always? Or could we make an extension in the integer case, per the
comment:

/// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
/// identified by the (potentially variable) element number IDX.  If the
/// return type is an integer type larger than the element type of the
/// vector, the result is extended to the width of the return type. In
/// that case, the high bits are undefined.

If we could do an ANY_EXTEND, this test case would be handled here (although I
am not sure if thats beneficial or not), or if not, I guess it should just
"break" (return without doing anything).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to