[PATCH] D151308: -fsanitize=function: fix alignment fault on Arm targets.
Michael Platings via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 03:13:31 PDT 2023
michaelplatings added inline comments.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:5380-5381
+ Builder.CreatePtrToInt(CalleePtr, IntPtrTy);
+ llvm::Value *AlignedCalleeAddress = Builder.CreateAnd(
+ CalleeAddress, llvm::ConstantInt::get(IntPtrTy, -2));
+ AlignedCalleePtr =
----------------
I think this line could be more readable. I suggest defining Mask separately and using `~1` instead of `-2`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151308/new/
https://reviews.llvm.org/D151308
More information about the cfe-commits
mailing list