[PATCH] D125652: [LLVM] Add a check if should cast atomic operations to integer type

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 20:06:49 PDT 2022


tianshilei1992 marked 2 inline comments as done.
tianshilei1992 added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:2052
+  /// AtomicExpand pass.
+  virtual AtomicExpansionKind shouldCastAtomicLoadInIR(LoadInst *LI) const {
+    if (LI->getType()->isFloatingPointTy())
----------------
tra wrote:
> Would it make sense to generalize all these  into `should{Cast,Expand}AtomicOpInIR(Instruction *I)` so we don't have to encode each instruction variant into the function name?
> 
> 
Sounds like a good idea. I'll do it in another patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125652



More information about the llvm-commits mailing list