[llvm] [loongarch][DAG][FREEZE] Fix crash when FREEZE a half(f16) type on loongarch (PR #107791)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 8 21:08:46 PDT 2024
================
@@ -324,3 +324,18 @@ define void @test_fmul_mem(ptr %p, ptr %q) nounwind {
store half %r, ptr %p
ret void
}
+
+define half @freeze_half() nounwind {
+; LA32-LABEL: freeze_half:
+; LA32: # %bb.0:
+; LA32-NEXT: fadd.s $fa0, $fa0, $fa0
+; LA32-NEXT: ret
+;
+; LA64-LABEL: freeze_half:
+; LA64: # %bb.0:
+; LA64-NEXT: fadd.s $fa0, $fa0, $fa0
+; LA64-NEXT: ret
+ %y1 = freeze half undef
----------------
arsenm wrote:
Better to test with a real incoming value, and not undef. the special case constant inputs should be additional tests
https://github.com/llvm/llvm-project/pull/107791
More information about the llvm-commits
mailing list