[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Chris Lattner
sabre at nondot.org
Thu Dec 7 14:37:02 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.257 -> 1.258
---
Log message:
Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64
---
Diffs of the changes: (+4 -1)
DAGCombiner.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.257 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.258
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.257 Thu Dec 7 14:04:42 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Dec 7 16:36:47 2006
@@ -3755,7 +3755,10 @@
// cast from setcc result type to select result type
if (AfterLegalize) {
SCC = DAG.getSetCC(TLI.getSetCCResultTy(), N0, N1, CC);
- Temp = DAG.getZeroExtendInReg(SCC, N2.getValueType());
+ if (N2.getValueType() < SCC.getValueType())
+ Temp = DAG.getZeroExtendInReg(SCC, N2.getValueType());
+ else
+ Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getValueType(), SCC);
} else {
SCC = DAG.getSetCC(MVT::i1, N0, N1, CC);
Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getValueType(), SCC);
More information about the llvm-commits
mailing list