[llvm] [loongarch][DAG][FREEZE] Fix crash when FREEZE a half(f16) type on loongarch (PR #107791)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 15:57:31 PDT 2024
Felipe940402 wrote:
> For zig with LLVM 19.1.0rc4, we are seeing the following error when bootstrapping a `loongarch64-linux-musl` target.
>
> [ziglang/zig-bootstrap#164 (comment)](https://github.com/ziglang/zig-bootstrap/issues/164#issuecomment-2332357069)
>
> It seems that this issue is caused by `PromoteFloatResult` is not handling FREEZE OP on loongarch.
>
> Here is the reproduction of the error: https://godbolt.org/z/PPfvWjjG5
>
> ~This patch adds the FREEZE OP handling with `PromoteFloatRes_UnaryOp` and adds a test case.~
>
> This patch changes loongarch's way of floating point promotion to soft promotion to avoid this problem.
>
> See: loongarch's handling of `half`:
>
> * [loongarch64 half (f16) failure to select with `+f` and `+d` #93894](https://github.com/llvm/llvm-project/issues/93894)
> * [[LoongArch] Allow f16 codegen with expansion to libcalls #94456](https://github.com/llvm/llvm-project/pull/94456)
>
> Also see: other float promotion FREEZE handling
>
> * [0019c2f](https://github.com/llvm/llvm-project/commit/0019c2f194a5e1f4cd65c5284e204328cc40ab3d)
Download
https://github.com/llvm/llvm-project/pull/107791
More information about the llvm-commits
mailing list