StoreInst should store Align, not MaybeAlign
This is D77454, except for stores. All the infrastructure work was done for loads, so the remaining changes necessary are relatively small. Differential Revision: https://reviews.llvm.org/D79968
This commit is contained in:
@@ -4922,7 +4922,9 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
MaybeAlign Align;
|
||||
if (Error Err = parseAlignmentValue(Record[OpNum], Align))
|
||||
return Err;
|
||||
I = new StoreInst(Val, Ptr, Record[OpNum + 1], Align);
|
||||
if (!Align)
|
||||
Align = TheModule->getDataLayout().getABITypeAlign(Val->getType());
|
||||
I = new StoreInst(Val, Ptr, Record[OpNum + 1], *Align);
|
||||
InstructionList.push_back(I);
|
||||
break;
|
||||
}
|
||||
@@ -4955,7 +4957,9 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
MaybeAlign Align;
|
||||
if (Error Err = parseAlignmentValue(Record[OpNum], Align))
|
||||
return Err;
|
||||
I = new StoreInst(Val, Ptr, Record[OpNum + 1], Align, Ordering, SSID);
|
||||
if (!Align)
|
||||
return error("Alignment missing from atomic store");
|
||||
I = new StoreInst(Val, Ptr, Record[OpNum + 1], *Align, Ordering, SSID);
|
||||
InstructionList.push_back(I);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user