[PATCH] D27157: IRGen: Remove all uses of CreateDefaultAlignedLoad.
Peter Collingbourne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 28 12:59:39 PST 2016
pcc added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2195
LoadInst *Load =
- Builder.CreateDefaultAlignedLoad(IntToPtr, /*isVolatile=*/true);
+ Builder.CreateAlignedLoad(IntTy, IntToPtr, CharUnits::fromQuantity(4));
+ Load->setVolatile(true);
----------------
rjmccall wrote:
> Why 4?
__readfsdword is a Windows intrinsic which returns an unsigned long, which always has size/alignment 4 on Windows.
But now that I think about it I suppose we can get here on other platforms with MS extensions enabled, so I've changed this to query the alignment.
https://reviews.llvm.org/D27157
More information about the cfe-commits
mailing list