[llvm] [NFC][AMDGPU] Add lit tests for FMA combining with freeze and nnan variants (PR #142628)
Harrison Hao via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 05:06:34 PDT 2025
================
@@ -0,0 +1,106 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck %s
+
+define float @fma_from_freeze_mul_add_left(float %x, float %y) {
+; CHECK-LABEL: fma_from_freeze_mul_add_left:
+; CHECK: ; %bb.0:
+; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; CHECK-NEXT: v_fma_f32 v0, v0, v1, 1.0
+; CHECK-NEXT: s_setpc_b64 s[30:31]
+ %mul = fmul reassoc nsz arcp contract afn float %x, %y
----------------
harrisonGPU wrote:
And next time, I hope to implement a combined FMA with these fast-math flags and nnan.
https://github.com/llvm/llvm-project/pull/142628
More information about the llvm-commits
mailing list