mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[DAG] Prevent crashes when merging constant stores with high-bit set. NFC.
llvm-svn: 303802
This commit is contained in:
parent
7dc90034fc
commit
e5871eda8b
@ -12349,9 +12349,9 @@ bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
|
||||
SDValue Val = St->getValue();
|
||||
StoreInt <<= ElementSizeBytes * 8;
|
||||
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Val)) {
|
||||
StoreInt |= C->getAPIntValue().zext(SizeInBits);
|
||||
StoreInt |= C->getAPIntValue().zextOrTrunc(SizeInBits);
|
||||
} else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(Val)) {
|
||||
StoreInt |= C->getValueAPF().bitcastToAPInt().zext(SizeInBits);
|
||||
StoreInt |= C->getValueAPF().bitcastToAPInt().zextOrTrunc(SizeInBits);
|
||||
} else {
|
||||
llvm_unreachable("Invalid constant element type");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user