search for: m_sub

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

Did you mean: g_sub
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
...(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)))) && Pred == ICmpInst::Predicate::ICMP_SGT) { } > Could you guys give some comment? Is there any b...
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