search for: m_defer

Displaying 2 results from an estimated 2 matches for "m_defer".

Did you mean: _defer
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
...:Predicate Pred; Value *A, *B, *Mul, *Sub, *Mul2; if (match(&SI, m_Select(m_ICmp(Pred, m_CombineAnd(m_BinOp(m_Value(A), m_Value(B)), m_Value(Mul)), m_AllOnes()), m_Deferred(Mul), m_CombineAnd( m_c_BinOp(m_CombineAnd(m_Sub(m_Zero(), m_Deferred (A)), m_Value(Sub)), m_Deferred(B)), m_Value(Mul2)))) && P...
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi, There is an opportunity in instCombine for following instruction pattern: %mul = mul nsw i32 %b, %a %cmp = icmp sgt i32 %mul, -1 %sub = sub i32 0, %a %mul2 = mul nsw i32 %sub, %b %cond = select i1 %cmp, i32 %mul, i32 %mul2 Source code for above pattern: return (a*b) >=0 ? (a*b) : -a*b; Currently, llvm(-O3) can not recognize this as abs(a*b). I initially think we could do this in