forked from OSchip/llvm-project
[X86] Don't use getZExtValue when we have no idea how large the input elements are.
llvm-svn: 326066
This commit is contained in:
parent
2286058f46
commit
5c980eba47
|
@ -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
Loading…
Reference in New Issue