[llvm] [RISCV] Fix lowering of negative zero with Zdinx 32-bit (PR #71869)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 14:00:45 PST 2023


================
@@ -937,9 +938,14 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
       Res = CurDAG->getMachineNode(Opc, DL, VT, Imm);
 
     // For f64 -0.0, we need to insert a fneg.d idiom.
-    if (NegZeroF64)
-      Res = CurDAG->getMachineNode(RISCV::FSGNJN_D, DL, VT, SDValue(Res, 0),
+    if (NegZeroF64) {
+      if (Is64Bit)
----------------
nemanjai wrote:

Sounds good, thank you.

https://github.com/llvm/llvm-project/pull/71869


More information about the llvm-commits mailing list