mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
progress making the world safe to ConstantDataVector. While
we're at it, allow PatternMatch's "neg" pattern to match integer vector negations, and enhance ComputeNumSigned bits to handle shl of vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -655,9 +655,12 @@ static bool CanShareConstantPoolEntry(const Constant *A, const Constant *B,
|
||||
if (A->getType() == B->getType()) return false;
|
||||
|
||||
// For now, only support constants with the same size.
|
||||
if (TD->getTypeStoreSize(A->getType()) != TD->getTypeStoreSize(B->getType()))
|
||||
uint64_t StoreSize = TD->getTypeStoreSize(A->getType());
|
||||
if (StoreSize != TD->getTypeStoreSize(B->getType()) ||
|
||||
StoreSize > 128)
|
||||
return false;
|
||||
|
||||
|
||||
// If a floating-point value and an integer value have the same encoding,
|
||||
// they can share a constant-pool entry.
|
||||
if (const ConstantFP *AFP = dyn_cast<ConstantFP>(A))
|
||||
|
Reference in New Issue
Block a user