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

2021-09-29 Thread Quinn Pham via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG67a3d1e27551: [PowerPC] swdiv builtins for XL compatibility (authored by quinnp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-09-29 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 375912. quinnp added a comment. Fixing failing test case after rebasing with https://reviews.llvm.org/D110213. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106959/new/ https://reviews.llvm.org/D106959 Files:

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

2021-09-28 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. Please note in the commit message that this is simply a wrapper for a floating point divide. XL provided this builtin because it doesn't produce software estimates by default at `-Of

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

2021-09-27 Thread Quinn Pham via Phabricator via cfe-commits
quinnp added a comment. In D106959#3021069 , @NeHuang wrote: > Do we already have a backend test case for `fdiv` emitting a software > estimate when `-Ofast` is used? I've added a testcase in `llvm/test/CodeGen/PowerPC/fdiv.ll` which goes from `fdiv fa

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

2021-09-27 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 375285. quinnp added a comment. Added a backend testcase which goes from `fdiv fast` to software estimate. Added a runline in the front end testcase that sets the fast math flags. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

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

2021-09-24 Thread Victor Huang via Phabricator via cfe-commits
NeHuang added a comment. Do we already have a backend test case for `fdiv` emitting a software estimate when `-Ofast` is used? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106959/new/ https://reviews.llvm.org/D106959

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

2021-09-24 Thread Quinn Pham via Phabricator via cfe-commits
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: >

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

2021-09-24 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 374847. quinnp marked 7 inline comments as done. quinnp added a comment. Updatign the patch to emit a fdiv for each of the builtins without any fast math flags. This will be safe and will still emit a software estimate when `-Ofast` is used. Repository: r

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

2021-08-06 Thread Victor Huang via Phabricator via cfe-commits
NeHuang added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-swdiv.c:17 +// CHECK-LABEL: @test_swdiv( +// CHECK:[[TMP0:%.*]] = load double, double* @a, align 8 +// CHECK-NEXT:[[TMP1:%.*]] = load double, double* @b, align 8 nit: alig

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

2021-07-30 Thread Amy Kwan via Phabricator via cfe-commits
amyk added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:1436 + +def int_ppc_ftdivdp : Intrinsic<[llvm_i32_ty], [llvm_double_ty, llvm_double_ty], [IntrNoMem]>; } Line too long? Comment at: llvm/include/llvm/IR/Intrins

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

2021-07-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma 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 quinnp wrote: >

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

2021-07-30 Thread Quinn Pham via Phabricator via cfe-commits
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

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

2021-07-30 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 363189. quinnp added a comment. Addressing review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106959/new/ https://reviews.llvm.org/D106959 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/

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

2021-07-30 Thread Victor Huang via Phabricator via cfe-commits
NeHuang added inline comments. Comment at: llvm/test/CodeGen/PowerPC/O3-pipeline.ll:211 ret void -} \ No newline at end of file +} unrelated change? Comment at: llvm/test/CodeGen/PowerPC/int-ppc-ftdivdp.ll:7 +; RUN: llc -verify-machineinstrs

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

2021-07-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma 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 A "fast" fdiv n

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

2021-07-28 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 362400. quinnp added a comment. Fixing a failing test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106959/new/ https://reviews.llvm.org/D106959 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/

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

2021-07-28 Thread Quinn Pham via Phabricator via cfe-commits
quinnp created this revision. Herald added subscribers: shchenz, kbarton, hiraditya, mgorny, nemanjai. quinnp requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This patch is in a series of patches to provide builtins for com