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

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 16:09:34 PDT 2022


tra added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:2050
 
+  /// Returns how the given (atomic) load should be casted by the IR-level
+  /// AtomicExpand pass.
----------------
just `cast`. It's an irregular verb.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:2052
+  /// AtomicExpand pass.
+  virtual AtomicExpansionKind shouldCastAtomicLoadInIR(LoadInst *LI) const {
+    if (LI->getType()->isFloatingPointTy())
----------------
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?




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