mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
InstCombine: fold fcmp (fneg x), (fneg y) -> fcmp x, y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2855,6 +2855,11 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
|
||||
}
|
||||
}
|
||||
|
||||
// fcmp (fneg x), (fneg y) -> fcmp x, y
|
||||
Value *X, *Y;
|
||||
if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
|
||||
return new FCmpInst(I.getPredicate(), X, Y);
|
||||
|
||||
// fcmp (fpext x), (fpext y) -> fcmp x, y
|
||||
if (FPExtInst *LHSExt = dyn_cast<FPExtInst>(Op0))
|
||||
if (FPExtInst *RHSExt = dyn_cast<FPExtInst>(Op1))
|
||||
|
||||
Reference in New Issue
Block a user