Use a memcpy so that type based alias analysis sees the change.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Nov 2014 01:02:22 +0000 (01:02 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Nov 2014 01:02:22 +0000 (01:02 +0000)
commit22df0eb2e81015afa9d74e04ab83e6dc9f21f551
tree6c9fec6ffcafbde5e83ef3946fd12d885c56d54e
parent81b73f3020af1f68457362bc5177a90d629e5a74
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

llvm-svn: 222294
llvm/include/llvm/ADT/APInt.h