mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
Use a memcpy so that type based alias analysis sees the change.
The other option would be to do something like if (that.isSingleWord()) VAL = that.VAL; else pVal = that.pVal This bug was causing 86TTI::getIntImmCost to be miscompiled in a LTO bootstrap in stage2, causing the build of stage3 to fail. LLVM is getting quiet good at exploiting this. Not sure if there is anything a sanitizer could do to help git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8e31c73cd
commit
28b45aa83e
@ -665,7 +665,9 @@ public:
|
||||
delete[] pVal;
|
||||
}
|
||||
|
||||
VAL = that.VAL;
|
||||
// Use memcpy so that type based alias analysis sees both VAL and pVal
|
||||
// as modified.
|
||||
memcpy(&VAL, &that.VAL, sizeof(uint64_t));
|
||||
|
||||
// If 'this == &that', avoid zeroing our own bitwidth by storing to 'that'
|
||||
// first.
|
||||
|
Loading…
x
Reference in New Issue
Block a user