[llvm] [AMDGPU] Handle negated f16 and fp conversion DAG combines (PR #213202)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 1 13:22:21 PDT 2026
================
@@ -0,0 +1,117 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=amdgpu9.0a-amd-amdhsa < %s | FileCheck %s
+
+define amdgpu_kernel void @fneg_fpext_half(ptr addrspace(1) %out, ptr addrspace(1) %in) {
+; CHECK-LABEL: fneg_fpext_half:
+; CHECK: ; %bb.0: ; %entry
+; CHECK-NEXT: s_load_dwordx4 s[0:3], s[8:9], 0x0
+; CHECK-NEXT: v_mov_b32_e32 v0, 0
+; CHECK-NEXT: s_waitcnt lgkmcnt(0)
+; CHECK-NEXT: global_load_ushort v1, v0, s[2:3]
+; CHECK-NEXT: s_waitcnt vmcnt(0)
+; CHECK-NEXT: v_cvt_f32_f16_e64 v1, -v1
+; CHECK-NEXT: global_store_dword v0, v1, s[0:1]
+; CHECK-NEXT: s_endpgm
+entry:
+ %h = load half, ptr addrspace(1) %in, align 2
+ %f = fpext half %h to float
+ %neg = fneg float %f
----------------
HalfBloodPrince010 wrote:
Added a new test case for the FP16_TO_FP case.
https://github.com/llvm/llvm-project/pull/213202
More information about the llvm-commits
mailing list