Assertion: `TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) == TargetLowering::TypeLegal && "Unexpected illegal type!"' failed.
| Bugzilla Link | 10481 |
| Resolution | WORKSFORME |
| Resolved on | Aug 09, 2012 11:12 |
| Version | trunk |
| OS | Windows NT |
| Reporter | LLVM Bugzilla Contributor |
| CC | @efriedma-quic,@darkbuck |
Extended Description
llc: LegalizeDAG.cpp:781: llvm::SDValue
- Running pass 'Function Pass Manager' on module 'temp.ll'.
- Running pass 'X86 DAG->DAG Instruction Selection' on function '@autogen_5860_500' ; ModuleID = 'bugpoint-reduced-simplified.bc' target triple = "x86_64-unknown-linux-gnu"
define void @autogen_5860_500(i8*, i32*, i64*, i32, i8, i64) { BB: %A4 = alloca <8 x i32> %A3 = alloca <8 x i32> %A2 = alloca <8 x i64> %A1 = alloca <8 x i32> %A = alloca <8 x i32> %L = load <8 x i64>* %A2 store <8 x i32> undef, <8 x i32>* %A %E = extractelement <8 x i64> %L, i32 0 %E5 = extractelement <8 x i64> %L, i32 2 %Shuff = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 undef, i32 7, i32 undef, i32 11, i32 13, i32 undef, i32 1, i32 3> %Shuff6 = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 7, i32 9, i32 undef, i32 13, i32 15, i32 1, i32 3, i32 5> %Shuff7 = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 undef, i32 11, i32 13, i32 15, i32 1, i32 undef, i32 5, i32 7> %I = insertelement <8 x i64> %L, i64 %E, i32 3 %B = xor <8 x i64> %Shuff, %L %Se = sext i32 %3 to i64 %S = select i1 true, i64 %E5, i64 %E %S8 = fcmp ugt double 0x3EC3280FC1A375B5, 0x3EC3280FC1A375B5 br label %CF
CF: ; preds = %CF, %BB %L9 = load i8* %0 store <8 x i32> undef, <8 x i32>* %A %E10 = extractelement <8 x i64> %L, i32 6 %E11 = extractelement <8 x i64> %L, i32 0 %Shuff12 = shufflevector <8 x i64> %Shuff7, <8 x i64> %L, <8 x i32> <i32 11, i32 13, i32 15, i32 1, i32 3, i32 undef, i32 7, i32 9> %Shuff13 = shufflevector <8 x i64> %L, <8 x i64> %Shuff12, <8 x i32> <i32 undef, i32 undef, i32 1, i32 3, i32 5, i32 7, i32 9, i32 undef> %Shuff14 = shufflevector <8 x i64> %Shuff, <8 x i64> %L, <8 x i32> <i32 15, i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 undef> %I15 = insertelement <8 x i64> %L, i64 %E, i32 1 %FC = sitofp i16 0 to double %S16 = select i1 true, double 0x3EC3280FC1A375B5, double 0x3EC3280FC1A375B5 %S17 = icmp uge <8 x i64> %B, %L %L18 = load i8* %0 store i8 -121, i8* %0 %E19 = extractelement <8 x i64> %L, i32 2 %E20 = extractelement <8 x i64> %L, i32 4 %Shuff21 = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 undef, i32 1, i32 undef, i32 undef, i32 undef, i32 9, i32 11, i32 13> %Shuff22 = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15> %Shuff23 = shufflevector <8 x i64> %Shuff13, <8 x i64> %L, <8 x i32> <i32 undef, i32 undef, i32 7, i32 9, i32 11, i32 13, i32 15, i32 1> %I24 = insertelement <8 x i64> %L, i64 219251, i32 5 %B25 = shl i32 -1, %3 %Tr = trunc i64 %E11 to i32 %S26 = select i1 true, i64 219251, i64 46007 %S27 = fcmp oeq double 0x3ECE6F7E564265C3, 0x3ED3CA9085EB6C6E br i1 %S27, label %CF, label %CF38
CF38: ; preds = %CF38, %CF %L28 = load i8* %0 store i8 -85, i8* %0 %E29 = extractelement <8 x i64> %L, i32 0 %E30 = extractelement <8 x i64> %L, i32 2 %Shuff31 = shufflevector <8 x i1> %S17, <8 x i1> %S17, <8 x i32> <i32 undef, i32 7, i32 9, i32 11, i32 13, i32 15, i32 1, i32 3> %Shuff32 = shufflevector <8 x i64> %L, <8 x i64> %Shuff23, <8 x i32> <i32 7, i32 9, i32 11, i32 undef, i32 15, i32 undef, i32 3, i32 5> %Shuff33 = shufflevector <8 x i64> %L, <8 x i64> %L, <8 x i32> <i32 9, i32 undef, i32 13, i32 15, i32 1, i32 3, i32 5, i32 7> %I34 = insertelement <8 x i64> %Shuff33, i64 %E, i32 3 %B35 = srem i64 219251, 46007 %PC = bitcast <8 x i32>* %A1 to i64* %S36 = select i1 true, i64 %E5, i64 %E5 %S37 = icmp eq i8 -121, %L9 br i1 %S37, label %CF38, label %CF39
CF39: ; preds = %CF38 store i64 %E29, i64* %PC store i64 %E19, i64* %PC store i64 46007, i64* %PC store i64 %E19, i64* %PC store i64 %E, i64* %PC ret void }
Works for me.
Close with worksforme?
it seems the latest trunk works with this test.
We should be able to handle expanding vectors with 64-bit element types on x86-32; granted, the code to do that might not actually exist, but in theory we have the infrastructure.
I don't know if what you're trying to do is legal. You're taking a bitcode file compiled for x86_64 and trying to output x86. It can't handle the i64 type in a register, so it's trying to "expand" it into multiple integers.
Simplified version:
target triple = "x86_64-unknown-linux-gnu"
define void @autogen_5860_500() { BB: %Shuff = shufflevector <8 x i64> zeroinitializer, <8 x i64> zeroinitializer, <8 x i32> <i32 undef, i32 7, i32 undef, i32 11, i32 13, i32 undef, i32 1, i32 3> %B = xor <8 x i64> %Shuff, zeroinitializer br label %CF
CF: ; preds = %CF, %BB %S17 = icmp uge <8 x i64> %B, zeroinitializer br i1 undef, label %CF, label %CF39.critedge
CF39.critedge: ; preds = %CF %Shuff31.c = shufflevector <8 x i1> %S17, <8 x i1> %S17, <8 x i32> <i32 undef, i32 7, i32 9, i32 11, i32 13, i32 15, i32 1, i32 3> ret void }