[PATCH] D92067: [PowerPC] Promote the i1 to i64 for SINT_TO_FP/FP_TO_SINT

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 18:20:55 PST 2020


steven.zhang added a comment.

In D92067#2417900 <https://reviews.llvm.org/D92067#2417900>, @qiucf wrote:

> After applying this patch, I enumerated signed/unsigned conversion between `i1~i128` and `f32/f64/f128/ppcf128`, only `ppcf128-i1` still crashes:
>
>   define i1 @pq_s1(ppc_fp128 %a) {
>     %b = fptosi ppc_fp128 %a to i1
>     ret i1 %b
>   }
>   
>   define i1 @pq_u1(ppc_fp128 %a) {
>     %b = fptoui ppc_fp128 %a to i1
>     ret i1 %b
>   }
>
>
>
>   Assertion failed: (LC != RTLIB::UNKNOWN_LIBCALL && "Unsupported FP_TO_SINT!"), function ExpandFloatOp_FP_TO_SINT, file llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
>
> Similar promotion can also fix this?



In D92067#2417900 <https://reviews.llvm.org/D92067#2417900>, @qiucf wrote:

> After applying this patch, I enumerated signed/unsigned conversion between `i1~i128` and `f32/f64/f128/ppcf128`, only `ppcf128-i1` still crashes:
>
>   define i1 @pq_s1(ppc_fp128 %a) {
>     %b = fptosi ppc_fp128 %a to i1
>     ret i1 %b
>   }
>   
>   define i1 @pq_u1(ppc_fp128 %a) {
>     %b = fptoui ppc_fp128 %a to i1
>     ret i1 %b
>   }
>
>
>
>   Assertion failed: (LC != RTLIB::UNKNOWN_LIBCALL && "Unsupported FP_TO_SINT!"), function ExpandFloatOp_FP_TO_SINT, file llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
>
> Similar promotion can also fix this?

As we have tried to promote the i1 to i64, but it still failed for ppc f128. So, there is other issue hidden I think. We can have some follow up to fix it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92067



More information about the llvm-commits mailing list