ISD::UNDEF should be expanded recursively / iteratively.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 19 Jun 2008 22:01:11 +0000 (22:01 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 19 Jun 2008 22:01:11 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52508 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
test/CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll [new file with mode: 0644]

index 87bb1dbf1420d726705ed40ac057a729e76cd935..883ba38ca3409ad6ea7170e5fbc0b51a6689416a 100644 (file)
@@ -5832,7 +5832,6 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
     Lo  = ExpandEXTRACT_VECTOR_ELT(Op);
     return ExpandOp(Lo, Lo, Hi);
   case ISD::UNDEF:
-    NVT = TLI.getTypeToExpandTo(VT);
     Lo = DAG.getNode(ISD::UNDEF, NVT);
     Hi = DAG.getNode(ISD::UNDEF, NVT);
     break;
diff --git a/test/CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll b/test/CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll
new file mode 100644 (file)
index 0000000..d337e37
--- /dev/null
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=ppc32
+
+define void @t() nounwind {
+       call void null( ppc_fp128 undef )
+       unreachable
+}