1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Forgot a check.

llvm-svn: 36910
This commit is contained in:
Evan Cheng 2007-05-07 21:36:06 +00:00
parent a949d165ee
commit e18b87868d

View File

@ -3428,7 +3428,7 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
MVT::ValueType SVT = Value.getOperand(0).getValueType();
unsigned OrigAlign = TLI.getTargetMachine().getTargetData()->
getPrefTypeAlignment(getTypeForValueType(SVT));
if (Align <= OrigAlign)
if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT))
return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(),
ST->getSrcValueOffset());
}