[PATCH] D127041: [LLVM] Add the support for fmax and fmin in atomicrmw instruction
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 13:36:42 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:66-67
+ case AtomicRMWInst::FMax:
+ // maxnum(x, +inf) -> +inf
+ return !CF->isNegative() && CF->isInfinity();
+ case AtomicRMWInst::FMin:
----------------
This isn't correct for signaling nans
================
Comment at: llvm/test/Bitcode/compatibility.ll:870
+; CHECK: %atomicrmw.fmin = atomicrmw fmin float* %word, float 1.000000e+00 monotonic
+ %atomicrmw.fmin = atomicrmw fmin float* %word, float 1.0 monotonic
+
----------------
Since you also touched dxil, is an additional test needed for dxil encoding?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127041/new/
https://reviews.llvm.org/D127041
More information about the llvm-commits
mailing list