search for: m_oneus

Displaying 4 results from an estimated 4 matches for "m_oneus".

Did you mean: m_oneuse
2019 Dec 31
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
Dear All, The InstCombine pass performs the following transformation. Z / (X / Y) => (Y * Z) / X This is performed only when operand Op1 ( (X/Y) in this case) has only one use in future. The code snippet is shown below. if (match(Op1, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) && (!isa<Constant>(Y) || !isa<Constant>(Op0))) { // Z / (X / Y) => (Y * Z) / X Value *YZ = Builder.CreateFMulFMF(Y, Op0, &I); return BinaryOperator::CreateFDivFMF(YZ, X, &I); } It would be great if someo...
2020 Jan 03
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
A couple more general comments: 1. There shouldn't be any correctness issues removing one-use checks (the transform should be safe independently of use-counts). 2. Ideally, you can remove a m_OneUse() from the code and run 'make check' or similar, and you will see a regression test failure because we have a 'negative' test to cover that pattern. That should make it clear that the one-use check is there intentionally and what the effect of removing it is. We've gotten bette...
2020 Jan 06
2
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
...02 PM Sanjay Patel <spatel at rotateright.com> > wrote: > >> A couple more general comments: >> 1. There shouldn't be any correctness issues removing one-use checks (the >> transform should be safe independently of use-counts). >> 2. Ideally, you can remove a m_OneUse() from the code and run 'make >> check' or similar, and you will see a regression test failure because we >> have a 'negative' test to cover that pattern. That should make it clear >> that the one-use check is there intentionally and what the effect of >> re...
2015 Apr 15
2
[LLVMdev] Instruction combiner multiplication canonicalization
...not overflow property. Please confirm my understanding. <File: InstCombineMulDivRem.cpp > 168 Instruction *InstCombiner::visitMul(BinaryOperator &I) { 268 // Canonicalize (X+C1)*CI -> X*CI+C1*CI. 269 { 270 Value *X; 271 Constant *C1; 272 if (match(Op0, m_OneUse(m_Add(m_Value(X), m_Constant(C1))))) { 273 Value *Mul = Builder->CreateMul(C1, Op1); 274 // Only go forward with the transform if C1*CI simplifies to a tidier 275 // constant. 276 if (!match(Mul, m_Mul(m_Value(), m_Value()))) 277 return BinaryOpera...