[PATCH] D155344: [RISCV] Generalize 'tryFoldSelectIntOp` to other operations.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 09:22:46 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:12300
+  SDValue IdentityOperand = OtherOpVT.isFloatingPoint() ?
+    DAG.getConstantFP(0.0, DL, OtherOpVT) :
+    AllOnesIsIdentity ? DAG.getAllOnesConstant(DL, OtherOpVT) : DAG.getConstant(0, DL, OtherOpVT);
----------------
The identity value for fadd is -0.0.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155344/new/

https://reviews.llvm.org/D155344



More information about the llvm-commits mailing list