mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
When rebuilding constant structs, make sure to honor the isPacked bit.
This fixes PR1491 and GlobalOpt/2007-06-04-PackedStruct.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3bee46792
commit
f0a9aaba4c
@ -1625,7 +1625,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
|
||||
Elts[Idx] = EvaluateStoreInto(Elts[Idx], Val, Addr, OpNo+1);
|
||||
|
||||
// Return the modified struct.
|
||||
return ConstantStruct::get(Elts);
|
||||
return ConstantStruct::get(&Elts[0], Elts.size(), STy->isPacked());
|
||||
} else {
|
||||
ConstantInt *CI = cast<ConstantInt>(Addr->getOperand(OpNo));
|
||||
const ArrayType *ATy = cast<ArrayType>(Init->getType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user