[llvm-commits] [llvm] r60443 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll
Evan Cheng
evan.cheng at apple.com
Tue Dec 2 13:57:14 PST 2008
Author: evancheng
Date: Tue Dec 2 15:57:09 2008
New Revision: 60443
URL: http://llvm.org/viewvc/llvm-project?rev=60443&view=rev
Log:
Remove a (what appears to be) overly strict assertion. Here is what happened:
1. ppcf128 select is expanded to f64 select's.
2. f64 select operand 0 is an i1 truncate, it's promoted to i32 zero_extend.
3. f64 select is updated. It's changed back to a "NewNode" and being re-analyzed.
4. f64 select operands are being processed. Operand 0 is a "NewNode". It's being expunged out of ReplacedValues map.
5. ExpungeNode tries to remap f64 select and notice it's a "NewNode" and assert.
Duncan, please take a look. Thanks.
Added:
llvm/trunk/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=60443&r1=60442&r2=60443&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Tue Dec 2 15:57:09 2008
@@ -386,7 +386,6 @@
RemapValue(I->second);
N = I->second;
}
- assert(N.getNode()->getNodeId() != NewNode && "Mapped to unanalyzed node!");
}
/// ExpungeNode - If N has a bogus mapping in ReplacedValues, eliminate it.
Added: llvm/trunk/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll?rev=60443&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll Tue Dec 2 15:57:09 2008
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin9.5
+
+define void @__multc3({ ppc_fp128, ppc_fp128 }* noalias sret %agg.result, ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind {
+entry:
+ %.pre139 = and i1 false, false ; <i1> [#uses=1]
+ br i1 false, label %bb6, label %bb21
+
+bb6: ; preds = %entry
+ %0 = tail call ppc_fp128 @copysignl(ppc_fp128 0xM00000000000000000000000000000000, ppc_fp128 %a) nounwind readnone ; <ppc_fp128> [#uses=0]
+ %iftmp.1.0 = select i1 %.pre139, ppc_fp128 0xM3FF00000000000000000000000000000, ppc_fp128 0xM00000000000000000000000000000000 ; <ppc_fp128> [#uses=1]
+ %1 = tail call ppc_fp128 @copysignl(ppc_fp128 %iftmp.1.0, ppc_fp128 %b) nounwind readnone ; <ppc_fp128> [#uses=0]
+ unreachable
+
+bb21: ; preds = %entry
+ unreachable
+}
+
+declare ppc_fp128 @copysignl(ppc_fp128, ppc_fp128) nounwind readnone
More information about the llvm-commits
mailing list