[PATCH] D106959: [PowerPC] swdiv builtins for XL compatibility

Quinn Pham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 13:26:17 PDT 2021


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


================
Comment at: llvm/test/CodeGen/PowerPC/LowerCheckedFPArith.ll:36
+; CHECK-NEXT:  %2 = fdiv fast float %0, %1
+; CHECK-NEXT:  %3 = fcmp une float %2, %2
+; CHECK-NEXT:  br i1 %3, label %swdiv_HWDIV, label %swdiv_MERGE
----------------
efriedma wrote:
> A "fast" fdiv never produces NaN, per LangRef.  Using fcmp like this is fragile at best.
> 
> (Maybe you want "fdiv arcp"?)
Thank you, I see what you mean. I have changed it to emit a `fdiv ninf arcp` instead of a `fdiv fast`. I included the `ninf` flag because without it the compiler doesn't produce the software div estimate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106959



More information about the cfe-commits mailing list