[PATCH] D28496: [AMDGPU] Implement f16 fcopysign

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 22:13:34 PST 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIInstructions.td:688
+  (V_BFI_B32 (S_MOV_B32 (i32 0x7fffffff)), $src0,
+    (V_LSHLREV_B32_e32 (i32 16), $src1))
+>;
----------------
This should use e64


================
Comment at: lib/Target/AMDGPU/SIInstructions.td:696
+    (V_BFI_B32 (S_MOV_B32 (i32 0x7fffffff)), (i32 (EXTRACT_SUBREG $src0, sub1)),
+      (V_LSHLREV_B32_e32 (i32 16), $src1)), sub1)
+>;
----------------
e64


================
Comment at: lib/Target/AMDGPU/SIInstructions.td:708
+  (V_BFI_B32 (S_MOV_B32 (i32 0x00007fff)), $src0,
+    (V_LSHRREV_B32_e32 (i32 16), (EXTRACT_SUBREG $src1, sub1)))
+>;
----------------
e64


================
Comment at: test/CodeGen/AMDGPU/fcopysign.f16.ll:1
+; RUN: llc -march=amdgcn -mcpu=tonga -enable-unsafe-fp-math -verify-machineinstrs < %s | FileCheck -check-prefix=FUNC -check-prefix=GCN -check-prefix=VI %s
+
----------------
This should also have an SI run line. The -enable-unsafe-fp-math should also be dropped


https://reviews.llvm.org/D28496





More information about the llvm-commits mailing list