[X86] Don't use getZExtValue when we have no idea how large the input elements are.

llvm-svn: 326066
This commit is contained in:
Craig Topper 2018-02-26 04:43:24 +00:00
parent 2286058f46
commit 5c980eba47
2 changed files with 1051 additions and 2 deletions

View File

@ -34401,8 +34401,8 @@ static SDValue detectAVGPattern(SDValue In, EVT VT, SelectionDAG &DAG,
ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op);
if (!C)
return false;
uint64_t Val = C->getZExtValue();
if (Val < Min || Val > Max)
const APInt &Val = C->getAPIntValue();
if (Val.ult(Min) || Val.ugt(Max))
return false;
}
return true;

File diff suppressed because it is too large Load Diff