Skip to content
Snippets Groups Projects
Commit 852a20a2 authored by clc5q's avatar clc5q
Browse files

Give operands of subword moves the MEDS type NUMERIC.

parent ce3e1f01
No related branches found
No related tags found
No related merge requests found
...@@ -6561,6 +6561,16 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) { ...@@ -6561,6 +6561,16 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) {
} }
#endif #endif
if ((UNINIT == RightType) && (UNINIT == LeftType)) { if ((UNINIT == RightType) && (UNINIT == LeftType)) {
unsigned short TempSignMask;
if (this->MDIsReducedWidthMove() && (!this->MDIsSignedLoad(TempSignMask))) {
CurrDef = this->SetDefType(DefOp, NUMERIC); // e.g. mov al,cl cannot be a POINTER
updated = true;
if (!CurrRT->HasRightSubTree()) {
CurrUse = this->SetUseType(UseOp, NUMERIC);
}
assert(UNINIT == OperType);
CurrRT->SetOperatorType(NUMERIC, this);
}
break; break;
} }
else if (UNINIT == OperType) { else if (UNINIT == OperType) {
...@@ -6583,6 +6593,7 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) { ...@@ -6583,6 +6593,7 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) {
CurrRT->SetOperatorType(LeftType, this); CurrRT->SetOperatorType(LeftType, this);
updated = true; updated = true;
UpdatedOperType = true; UpdatedOperType = true;
OperType = LeftType;
} }
// Speed up type propagation by passing the RightType/OperType to the Def // Speed up type propagation by passing the RightType/OperType to the Def
// on this iteration. // on this iteration.
...@@ -6675,6 +6686,7 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) { ...@@ -6675,6 +6686,7 @@ bool SMPInstr::InferOperatorType(SMPRegTransfer *CurrRT) {
} }
CurrUse = this->SetUseType(UseOp, OperType); CurrUse = this->SetUseType(UseOp, OperType);
updated = true; updated = true;
RightType = OperType;
} }
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment