[PATCH] D137361: IR: Add atomicrmw uinc_wrap and udec_wrap
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 5 09:38:22 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LowerAtomic.cpp:85
+ Value *Cmp = Builder.CreateICmpUGE(Loaded, Val);
+ Constant *Zero = ConstantInt::get(Loaded->getType(), 0);
+ return Builder.CreateSelect(Cmp, Zero, Inc, "new");
----------------
tianshilei1992 wrote:
> is `ConstantInt::getNullValue` better here?
That's really Constant::getNullValue which dispatches over the type and just gets back to this for ConstantInts
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137361/new/
https://reviews.llvm.org/D137361
More information about the llvm-commits
mailing list