llvm-project
13280d99 - [loongarch][DAG][FREEZE] Fix crash when FREEZE a half(f16) type on loongarch (#107791)

Commit
1 year ago
[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
Author
Parents
Loading