[all-commits] [llvm/llvm-project] 3e53bf: [PowerPC32] Fix the `setcc` inconsistent result ty...

David Tenty via All-commits all-commits at lists.llvm.org
Thu Mar 12 07:50:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e53bf5781e01784dedb7885867f39d09201ec88
      https://github.com/llvm/llvm-project/commit/3e53bf5781e01784dedb7885867f39d09201ec88
  Author: Xiangling Liao <Xiangling.Liao at ibm.com>
  Date:   2020-03-12 (Thu, 12 Mar 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    A llvm/test/CodeGen/PowerPC/ppc32-i64-to-float-conv.ll

  Log Message:
  -----------
  [PowerPC32] Fix the `setcc` inconsistent result type problem

Summary:
On 32-bit PPC target[AIX and BE], when we convert an `i64` to `f32`, a `setcc` operand expansion is needed. The expansion will set the result type of expanded `setcc` operation based on if the subtarget use CRBits or not. If the subtarget does use the CRBits, like AIX and BE, then it will set the result type to `i1`, leading to an inconsistency with original `setcc` result type[i32].
And the reason why it crashed underneath is because we don't set result type of setcc consistent in those two places.

This patch fixes this problem by setting original setcc opnode result type also with `getSetCCResultType`  interface.

Reviewers: sfertile, cebowleratibm, hubert.reinterpretcast, Xiangling_L

Reviewed By: sfertile

Subscribers: wuzish, nemanjai, hiraditya, kbarton, jsji, shchenz, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75702




More information about the All-commits mailing list