mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
InstCombine: fold fcmp (fpext x), (fpext y) -> fcmp x, y.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2813,5 +2813,12 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
|
||||
}
|
||||
}
|
||||
|
||||
// fcmp (fpext x), (fpext y) -> fcmp x, y
|
||||
if (FPExtInst *LHSExt = dyn_cast<FPExtInst>(Op0))
|
||||
if (FPExtInst *RHSExt = dyn_cast<FPExtInst>(Op1))
|
||||
if (LHSExt->getSrcTy() == RHSExt->getSrcTy())
|
||||
return new FCmpInst(I.getPredicate(), LHSExt->getOperand(0),
|
||||
RHSExt->getOperand(0));
|
||||
|
||||
return Changed ? &I : 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user