[PATCH] D92083: [PowerPC] Lower the SETCC/SELECT_CC/BR_CC as libcall for fp128 with Power9 vector disabled

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 28 18:11:01 PST 2020


steven.zhang added a comment.

In D92083#2472646 <https://reviews.llvm.org/D92083#2472646>, @nemanjai wrote:

> Please explain in the description of the review (and subsequent commit message) why custom lowering is needed. I suppose for `SELECT_CC`, it is needed because using `setOperationAction()` uses the result type which is only guaranteed to match the true/false value but not the comparison types. However, it is not immediately obvious to me why we need custom lowering for `BR_CC`.

Update the description. The reason why we need to custom lower the BR_CC has been explained in the code comment. The legalizer tries its best to expand the BR_CC which is not what we want.

  // Lower the br_cc as follows for fp128 as we didn't have native
  // instruction to lower the setcc on fp128.
  // br_cc cc, x, y, dest ->
  // z = setcc x, y, cc (expand as libcall)
  // br_cc NE, z, 0, dest


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92083



More information about the llvm-commits mailing list