[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Devang Patel
dpatel at apple.com
Mon Dec 4 15:55:16 PST 2006
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.137 -> 1.138
---
Log message:
SCCP does not handle Packed Type properly. Disable Packed Type handling
for now.
---
Diffs of the changes: (+17 -1)
SCCP.cpp | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.137 llvm/lib/Transforms/Scalar/SCCP.cpp:1.138
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.137 Sun Nov 26 03:46:52 2006
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Mon Dec 4 17:54:59 2006
@@ -749,6 +749,11 @@
}
void SCCPSolver::visitExtractElementInst(ExtractElementInst &I) {
+ // FIXME : SCCP does not handle vectors properly.
+ markOverdefined(&I);
+ return;
+
+#if 0
LatticeVal &ValState = getValueState(I.getOperand(0));
LatticeVal &IdxState = getValueState(I.getOperand(1));
@@ -757,9 +762,14 @@
else if(ValState.isConstant() && IdxState.isConstant())
markConstant(&I, ConstantExpr::getExtractElement(ValState.getConstant(),
IdxState.getConstant()));
+#endif
}
void SCCPSolver::visitInsertElementInst(InsertElementInst &I) {
+ // FIXME : SCCP does not handle vectors properly.
+ markOverdefined(&I);
+ return;
+#if 0
LatticeVal &ValState = getValueState(I.getOperand(0));
LatticeVal &EltState = getValueState(I.getOperand(1));
LatticeVal &IdxState = getValueState(I.getOperand(2));
@@ -773,13 +783,18 @@
EltState.getConstant(),
IdxState.getConstant()));
else if (ValState.isUndefined() && EltState.isConstant() &&
- IdxState.isConstant())
+ IdxState.isConstant())
markConstant(&I, ConstantExpr::getInsertElement(UndefValue::get(I.getType()),
EltState.getConstant(),
IdxState.getConstant()));
+#endif
}
void SCCPSolver::visitShuffleVectorInst(ShuffleVectorInst &I) {
+ // FIXME : SCCP does not handle vectors properly.
+ markOverdefined(&I);
+ return;
+#if 0
LatticeVal &V1State = getValueState(I.getOperand(0));
LatticeVal &V2State = getValueState(I.getOperand(1));
LatticeVal &MaskState = getValueState(I.getOperand(2));
@@ -801,6 +816,7 @@
MaskState.getConstant() : UndefValue::get(I.getOperand(2)->getType());
markConstant(&I, ConstantExpr::getShuffleVector(V1, V2, Mask));
}
+#endif
}
// Handle getelementptr instructions... if all operands are constants then we
More information about the llvm-commits
mailing list