[PATCH] D134561: AtomicExpand: Support cmpxchg expansion for small FP types

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 13:45:58 PDT 2022


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


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:847-852
+  Value *ValOperand = AI->getValOperand();
+  ValOperand = Builder.CreateBitCast(ValOperand, PMV.IntValueType);
+
   Value *ValOperand_Shifted =
-      Builder.CreateShl(Builder.CreateZExt(AI->getValOperand(), PMV.WordType),
+      Builder.CreateShl(Builder.CreateZExt(ValOperand, PMV.WordType),
                         PMV.ShiftAmt, "ValOperand_Shifted");
----------------
jyknight wrote:
> This shifted value isn't actually used for the existing min/max/umin/umax -- nor the new fadd/fsub/fmin/fmax support.
> 
> Perhaps we should just avoid creating it when it's unneeded?
Fixed this in D134903


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

https://reviews.llvm.org/D134561



More information about the llvm-commits mailing list