assertion failure handling 64-bit umulh sequence #1570
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
llvm:codegen
Extended Description
This test case:
define i64 @foo(i64 %x, i64 %y) {
%tmp0 = zext i64 %x to i128
%tmp1 = zext i64 %y to i128
%tmp2 = mul i128 %tmp0, %tmp1
%tmp7 = zext i32 64 to i128
%tmp3 = lshr i128 %tmp2, %tmp7
%tmp4 = trunc i128 %tmp3 to i64
ret i64 %tmp4
}
compiled with -march=x86-64 triggers the following assertion failure:
lib/CodeGen/SelectionDAG/TargetLowering.cpp:2197: llvm::MVT::ValueType
llvm::TargetLowering::getValueType(const llvm::Type*) const: Assertion `0 &&
"Invalid width for value type"' failed.
The following patch fixes it.
Index: TargetLowering.cpp
RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp,v
retrieving revision 1.89
diff -u -r1.89 TargetLowering.cpp
--- TargetLowering.cpp
+++ TargetLowering.cpp
@@ -2200,6 +2200,7 @@
case 16: return MVT::i16;
case 32: return MVT::i32;
case 64: return MVT::i64;
break;
case Type::FloatTyID: return MVT::f32;
The text was updated successfully, but these errors were encountered: