search for: m_opposit

Displaying 3 results from an estimated 3 matches for "m_opposit".

Did you mean: m_opposite
2017 Jul 13
2
failing to optimize boolean ops on cmps
...; > This probably does require a special matcher though: > > > We have: > if (m_c_And(m_Cmp(Pred, m_Value(), m_Value()), > m_Cmp(Pred, m_Value(), m_Value())) > > and you really want: > if (m_c_And(m_Cmp(Pred, m_Value(), m_Value()), > m_Cmp(m_Opposite(Pred), m_Value(), m_Value())) > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170713/6108341b/attachment.html>
2017 Jul 13
2
failing to optimize boolean ops on cmps
We have several optimizations in InstCombine for bitwise logic ops (and/or/xor) that fail to handle compare patterns with the equivalent bitwise logic. Example: define i8 @or_and_not(i8 %a, i8 %b) { %nota = xor i8 %a, -1 %and = and i8 %nota, %b %res = or i8 %and, %a ret i8 %res } define i1 @or_and_cmp_not(i32 %a, i32 %b, i1 %c) { %cmp = icmp sgt i32 %a, %b %cmp_inv = icmp sle i32 %a,
2017 Jul 14
2
failing to optimize boolean ops on cmps
...a special matcher though: > > > We have: > if (m_c_And(m_Cmp(Pred, m_Value(), m_Value()), > m_Cmp(Pred, m_Value(), m_Value())) > > and you really want: > if (m_c_And(m_Cmp(Pred, m_Value(), m_Value()), > m_Cmp(m_Opposite(Pred), m_Value(), m_Value())) > > > > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -- Hal Finkel Lead, Compiler Technology and Program...