[PATCH] D118632: [Clang][OpenMP] Add the codegen support for `atomic compare`

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 14:14:51 PST 2022


tianshilei1992 marked an inline comment as done.
tianshilei1992 added inline comments.


================
Comment at: clang/test/OpenMP/atomic_compare_codegen.cpp:1990
+// CHECK-NEXT:    [[DD:%.*]] = alloca double, align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i8, i8* [[CE]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = atomicrmw umin i8* [[CX]], i8 [[TMP0]] monotonic, align 1
----------------
ABataev wrote:
> tianshilei1992 wrote:
> > tianshilei1992 wrote:
> > > tianshilei1992 wrote:
> > > > I think the `store` here is redundant. Is it because I'm using `CGF.EmitScalarExpr`?
> > > Oh, shoot. `load` here, instead of `store`.
> > And here. @ABataev 
> Yes, because of EmitScalarExpr
Can we somehow avoid the `load` here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118632/new/

https://reviews.llvm.org/D118632



More information about the llvm-commits mailing list