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

Created attachment 21901
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

/// 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

Reply via email to