[all-commits] [llvm/llvm-project] 13280d: [loongarch][DAG][FREEZE] Fix crash when FREEZE a h...

YANG Xudong via All-commits all-commits at lists.llvm.org
Thu Sep 12 17:50:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13280d99aec5b4f383a2f3d5c10ecb148a07384e
      https://github.com/llvm/llvm-project/commit/13280d99aec5b4f383a2f3d5c10ecb148a07384e
  Author: YANG Xudong <yangxudong at ymatrix.cn>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.h
    M llvm/test/CodeGen/LoongArch/fp16-promote.ll

  Log Message:
  -----------
  [loongarch][DAG][FREEZE] Fix crash when FREEZE a half(f16) type on loongarch (#107791)

For zig with LLVM 19.1.0rc4, we are seeing the following error when
bootstrapping a `loongarch64-linux-musl` target.


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`:
- https://github.com/llvm/llvm-project/issues/93894
- https://github.com/llvm/llvm-project/pull/94456

Also see: other float promotion FREEZE handling
-
https://github.com/llvm/llvm-project/commit/0019c2f194a5e1f4cd65c5284e204328cc40ab3d



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list