mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Bug fix: should check ABI alignment, not pref. alignment.
llvm-svn: 37094
This commit is contained in:
parent
34928ae31f
commit
a781c7788a
@ -2685,7 +2685,7 @@ SDOperand DAGCombiner::visitBIT_CONVERT(SDNode *N) {
|
||||
TLI.isOperationLegal(ISD::LOAD, VT)) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
unsigned Align = TLI.getTargetMachine().getTargetData()->
|
||||
getPrefTypeAlignment(getTypeForValueType(VT));
|
||||
getABITypeAlignment(getTypeForValueType(VT));
|
||||
unsigned OrigAlign = LN0->getAlignment();
|
||||
if (Align <= OrigAlign) {
|
||||
SDOperand Load = DAG.getLoad(VT, LN0->getChain(), LN0->getBasePtr(),
|
||||
@ -3564,7 +3564,7 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
|
||||
unsigned Align = ST->getAlignment();
|
||||
MVT::ValueType SVT = Value.getOperand(0).getValueType();
|
||||
unsigned OrigAlign = TLI.getTargetMachine().getTargetData()->
|
||||
getPrefTypeAlignment(getTypeForValueType(SVT));
|
||||
getABITypeAlignment(getTypeForValueType(SVT));
|
||||
if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT))
|
||||
return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(),
|
||||
ST->getSrcValueOffset());
|
||||
|
Loading…
Reference in New Issue
Block a user