[PATCH] D25991: [PPC] Peephole to remove extra fcmp that checks for NaN
Ehsan Amiri via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 01:00:36 PDT 2016
amehsan added inline comments.
================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:1619
// comparison with zero.
if (OpC == PPC::FCMPUS || OpC == PPC::FCMPUD)
+ return optimizeFPCmpInstr(CmpInstr, SrcReg, SrcReg2, Mask, Value, MRI);
----------------
amehsan wrote:
> nemanjai wrote:
> > This may be a naive question since I don't really know under which conditions we emit XSCMPUDP vs. FCMPUD, but can this not be done with XSCMPUDP as well? Or perhaps there is no need for this.
> That's a good question. The problem is PPCInstrInfo::analyzeCompare() does not return true for FCMPUD so from Peephole opt point of view XSCMPUD is not a compare opcode. Since there might be some finer points that has to be take into account, I opened a [[ https://llvm.org/bugs/show_bug.cgi?id=30805 | PR for this ]], rather than fixing it here.
Typo in the comment: PPCInstrInfo::analyzeCompare() does not return true for **XSCMPUDP **
https://reviews.llvm.org/D25991
More information about the llvm-commits
mailing list