search for: m_anyzero

Displaying 5 results from an estimated 5 matches for "m_anyzero".

2013 Jul 22
0
[LLVMdev] Inverse of ConstantFP::get and similar functions?
...onstantVector or ConstantDataVector with all zeros of either sign, or > a zero initializer... > > Anyone have any thoughts, and/or can point me to somewhere where this > kind of thing is already implemented? We do already have Constant::isZeroValue(). There's also m_SpecificFP and m_AnyZero in PatternMatch.h. -Eli
2017 Mar 15
2
Speculative execution of FP divide Instructions - Call-Graph Simplify
...can do to prove + // it is non-zero. + if (auto *VV = dyn_cast<ConstantVector>(Denominator)) + Denominator = VV->getSplatValue(); + if (!isa<ConstantFP>(Denominator)) + return false; + // The denominator is a zero constant - we can't speculate here. + if (m_AnyZero().match(Denominator)) + return false; + return true; + } case Instruction::Load: { const LoadInst *LI = cast<LoadInst>(Inst); if (!LI->isUnordered() || ``` I did my tests using a powerpc64le target, but I couldn't find any target specific login involved in this tr...
2017 Mar 15
3
Speculative execution of FP divide Instructions - Call-Graph Simplify
...if (auto *VV = dyn_cast<ConstantVector>(Denominator)) >> + Denominator = VV->getSplatValue(); >> + if (!isa<ConstantFP>(Denominator)) >> + return false; >> + // The denominator is a zero constant - we can't speculate here. >> + if (m_AnyZero().match(Denominator)) >> + return false; >> + return true; >> + } >> case Instruction::Load: { >> const LoadInst *LI = cast<LoadInst>(Inst); >> if (!LI->isUnordered() || >> ``` >> I did my tests using a powerpc64le targe...
2013 Jul 22
6
[LLVMdev] Inverse of ConstantFP::get and similar functions?
Hi, I noticed that ConstantFP::get automatically returns the appropriately types Constant depending on the LLVM type passed in (i.e. if called with a vector, it returns a splat vector with the given constant). Is there any simple way to do the inverse of this function? i.e., given a llvm::Value, check whether it is either a scalar of the given constant value or a splat vector with the given
2017 Mar 15
2
Speculative execution of FP divide Instructions - Call-Graph Simplify
...can do to prove + // it is non-zero. + if (auto *VV = dyn_cast<ConstantVector>(Denominator)) + Denominator = VV->getSplatValue(); + if (!isa<ConstantFP>(Denominator)) + return false; + // The denominator is a zero constant - we can't speculate here. + if (m_AnyZero().match(Denominator)) + return false; + return true; + } case Instruction::Load: { const LoadInst *LI = cast<LoadInst>(Inst); if (!LI->isUnordered() || ``` I did my tests using a powerpc64le target, but I couldn't find any target specific login involved in this tr...