mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[SelectionDAGBuilder] Use APInt::isZero instead of comparing APInt::getZExtValue to 0 in a place where we can't be sure contents of the APInt fit in a uint64_t.
This is used on an extract vector element index which is most cases is going to be an i32 or i64 and the element will be a valid element number. But it is possible to construct IR with a larger type and large out of range value. llvm-svn: 337652
This commit is contained in:
parent
4415c5307b
commit
df2d78ff82
@ -2757,7 +2757,7 @@ static bool isVectorReductionOp(const User *I) {
|
||||
return false;
|
||||
|
||||
const ConstantInt *Val = dyn_cast<ConstantInt>(U->getOperand(1));
|
||||
if (!Val || Val->getZExtValue() != 0)
|
||||
if (!Val || !Val->isZero())
|
||||
return false;
|
||||
|
||||
ReduxExtracted = true;
|
||||
|
Loading…
Reference in New Issue
Block a user