[PATCH] D155344: [RISCV] Generalize 'tryFoldSelectIntOp` to other operations.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 16:12:04 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:12297
+ EVT OtherOpVT = OtherOp->getValueType(0);
+ SDValue IdentityOperand = OtherOpVT.isFloatingPoint() ?
+ DAG.getConstantFP(0.0, DL, OtherOpVT) :
----------------
Drop the isFloatingPoint check?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:12297
+ EVT OtherOpVT = OtherOp->getValueType(0);
+ SDValue IdentityOperand = OtherOpVT.isFloatingPoint() ?
+ DAG.getConstantFP(0.0, DL, OtherOpVT) :
----------------
craig.topper wrote:
> Drop the isFloatingPoint check?
You can use DAG.getNeutralElement
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155344/new/
https://reviews.llvm.org/D155344
More information about the llvm-commits
mailing list