1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Fix the trunc(load) case, finally allowing crafty and povray to pass

llvm-svn: 23718
This commit is contained in:
Chris Lattner 2005-10-13 22:10:05 +00:00
parent 2563394c27
commit b2db3f50f2

View File

@ -462,6 +462,7 @@ SDOperand DAGCombiner::visitTokenFactor(SDNode *N) {
if (N->getOperand(1).getOpcode() == ISD::EntryToken)
return N->getOperand(0);
}
// fold (tokenfactor (tokenfactor)) -> tokenfactor
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
SDOperand Op = N->getOperand(i);
@ -1386,8 +1387,8 @@ SDOperand DAGCombiner::visitTRUNCATE(SDNode *N) {
DAG.getConstant(PtrOff, PtrType));
WorkList.push_back(NewPtr.Val);
SDOperand Load = DAG.getLoad(VT, N0.getOperand(0), NewPtr,N0.getOperand(2));
CombineTo(N0.Val, Load, Load.getOperand(0));
WorkList.push_back(N);
CombineTo(N0.Val, Load, Load.getValue(1));
return SDOperand();
}
return SDOperand();